ObjFW  Check-in [8386b52824]

Overview
Comment:socket.m: Set the sin_len field on Wii
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8386b528242aa1ebc8024db8ec085e6552cabda5e1baf0634922d3edbf3e7dfd
User & Date: js on 2018-08-26 21:06:21
Other Links: manifest | tags
Context
2018-08-27
22:02
.travis.yml: Disable Wii until libogc is updated check-in: f06e338487 user: js tags: trunk
2018-08-26
21:06
socket.m: Set the sin_len field on Wii check-in: 8386b52824 user: js tags: trunk
18:39
Fix compilation for Wii check-in: bed2db0fd3 user: js tags: trunk
Changes

Modified src/socket.m from [83494e19e7] to [6e3f77394d].

237
238
239
240
241
242
243

244



245
246
247



248
249
250
251
252
253
254
	of_socket_address_t ret;
	struct sockaddr_in *addrIn = &ret.sockaddr.in;
	OFArray OF_GENERIC(OFString *) *components;
	uint32_t addr;

	memset(&ret, '\0', sizeof(ret));
	ret.family = OF_SOCKET_ADDRESS_FAMILY_IPV4;

	ret.length = sizeof(ret.sockaddr.in);




	addrIn->sin_family = AF_INET;
	addrIn->sin_port = OF_BSWAP16_IF_LE(port);




	components = [IPv4 componentsSeparatedByString: @"."];

	if ([components count] != 4)
		@throw [OFInvalidFormatException exception];

	addr = 0;







>

>
>
>



>
>
>







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
	of_socket_address_t ret;
	struct sockaddr_in *addrIn = &ret.sockaddr.in;
	OFArray OF_GENERIC(OFString *) *components;
	uint32_t addr;

	memset(&ret, '\0', sizeof(ret));
	ret.family = OF_SOCKET_ADDRESS_FAMILY_IPV4;
#ifndef OF_WII
	ret.length = sizeof(ret.sockaddr.in);
#else
	ret.length = 8;
#endif

	addrIn->sin_family = AF_INET;
	addrIn->sin_port = OF_BSWAP16_IF_LE(port);
#ifdef OF_WII
	addrIn->sin_len = ret.length;
#endif

	components = [IPv4 componentsSeparatedByString: @"."];

	if ([components count] != 4)
		@throw [OFInvalidFormatException exception];

	addr = 0;