ObjFW  Check-in [580e5ab656]

Overview
Comment:Fix OFSCTPSocket on FreeBSD
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 580e5ab65623d7c45cd8e846586be0c866062201b2e7993640874f77ee0abd9d
User & Date: js on 2024-05-05 08:37:00
Other Links: manifest | tags
Context
2024-05-05
08:39
GitHub Actions: Load SCTP kernel module on FreeBSD check-in: ebb50f7d8f user: js tags: trunk
08:37
Fix OFSCTPSocket on FreeBSD check-in: 580e5ab656 user: js tags: trunk
00:55
Update buildsys check-in: 396d832ab9 user: js tags: trunk
Changes

Modified src/OFSCTPSocket.m from [29ca29fac2] to [ae3353be38].

362
363
364
365
366
367
368

369
370
371
372
373
374


375
376
377
378
379
380
381
362
363
364
365
366
367
368
369
370
371
372
373


374
375
376
377
378
379
380
381
382







+




-
-
+
+







	struct iovec iov = {
		.iov_base = buffer,
		.iov_len = length
	};
	struct sctp_rcvinfo rcvinfo;
	socklen_t rcvinfoSize = (socklen_t)sizeof(rcvinfo);
	unsigned int infotype = SCTP_RECVV_RCVINFO;
	int flags;

	if (_socket == OFInvalidSocketHandle)
		@throw [OFNotOpenException exceptionWithObject: self];

	if ((ret = sctp_recvv(_socket, &iov, 1, NULL, 0, &rcvinfo, &rcvinfoSize,
	    &infotype, 0)) < 0)
	if ((ret = sctp_recvv(_socket, &iov, 1, NULL, NULL,
	    &rcvinfo, &rcvinfoSize, &infotype, &flags)) < 0)
		@throw [OFReadFailedException
		    exceptionWithObject: self
			requestedLength: length
				  errNo: _OFSocketErrNo()];

	if (info != NULL) {
		if (infotype == SCTP_RECVV_RCVINFO &&