ObjFW  Check-in [b64b8e3b3f]

Overview
Comment:Fix OFSocketAddressString() for AppleTalk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.0
Files: files | file ages | folders
SHA3-256: b64b8e3b3ff997fa76b2e44c517d99a640ed7951849f42b8333e7a7f432c2be7
User & Date: js on 2023-10-22 21:47:51
Other Links: branch diff | manifest | tags
Context
2023-10-23
23:29
README.md: Remove Gitter check-in: a1d73d0a2f user: js tags: 1.0
2023-10-22
21:47
Fix OFSocketAddressString() for AppleTalk check-in: b64b8e3b3f user: js tags: 1.0
21:47
Fix OFSocketAddressString() for AppleTalk check-in: 4056d5e2b6 user: js tags: trunk
2023-10-21
20:53
+[networkInterfaces]: Use index as key on Windows check-in: 723a396c1a user: js tags: 1.0
Changes

Modified src/OFSocket.h from [39b53adb69] to [0e7b6e8e00].

286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
extern unsigned long OFSocketAddressHash(
    const OFSocketAddress *_Nonnull address);

/**
 * @brief Converts the specified @ref OFSocketAddress to a string.
 *
 * @param address The address to convert to a string
 * @return The address as an IP string, without the port
 */
extern OFString *_Nonnull OFSocketAddressString(
    const OFSocketAddress *_Nonnull address);

/**
 * @brief Sets the IP port of the specified @ref OFSocketAddress.
 *







|







286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
extern unsigned long OFSocketAddressHash(
    const OFSocketAddress *_Nonnull address);

/**
 * @brief Converts the specified @ref OFSocketAddress to a string.
 *
 * @param address The address to convert to a string
 * @return The address as a string, without the port
 */
extern OFString *_Nonnull OFSocketAddressString(
    const OFSocketAddress *_Nonnull address);

/**
 * @brief Sets the IP port of the specified @ref OFSocketAddress.
 *

Modified src/OFSocket.m from [0cd5c67cfd] to [cb58b19af7].

963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
}

static OFString *
appleTalkString(const OFSocketAddress *address)
{
	const struct sockaddr_at *addrAT = &address->sockaddr.at;

	return [OFString stringWithFormat: @"%d.%d",
	    OFFromBigEndian16(addrAT->sat_net), addrAT->sat_node];
}

OFString *
OFSocketAddressString(const OFSocketAddress *address)
{
	switch (address->family) {







|







963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
}

static OFString *
appleTalkString(const OFSocketAddress *address)
{
	const struct sockaddr_at *addrAT = &address->sockaddr.at;

	return [OFString stringWithFormat: @"%" PRIu8 ".%" PRIu8,
	    OFFromBigEndian16(addrAT->sat_net), addrAT->sat_node];
}

OFString *
OFSocketAddressString(const OFSocketAddress *address)
{
	switch (address->family) {