ObjFW  Check-in [e5157b2ba2]

Overview
Comment:OFStreamObserver_kqueue: Return NO on error.

Using an assertion there was not a good idea.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e5157b2ba254a135ed41741cadeb43a08b19571c9a8b136784bd40e42f9d32ab
User & Date: js on 2012-12-27 11:20:34
Other Links: manifest | tags
Context
2012-12-27
11:21
OFHTTPServer: Pass errors from listening socket. check-in: df7b88405a user: js tags: trunk
11:20
OFStreamObserver_kqueue: Return NO on error. check-in: e5157b2ba2 user: js tags: trunk
11:16
OFTCPSocket: Set SO_REUSEADDR on -[bind]. check-in: 5243a86320 user: js tags: trunk
Changes

Modified src/OFStreamObserver_kqueue.m from [d8e79884c0] to [9a99bdfa5c].

124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

	objc_autoreleasePoolPop(pool);

	events = kevent(kernelQueue, [changeList items],
	    (int)[changeList count], eventList, EVENTLIST_SIZE,
	    (timeout == -1 ? NULL : &timespec));

	if (events == -1) {
		switch (errno) {
		case EINTR:
			return NO;
		case ENOMEM:
			@throw [OFOutOfMemoryException
			    exceptionWithClass: [self class]];
		default:
			assert(0);
		}
	}

	[changeList removeAllItems];

	if (events == 0)
		return NO;

	for (i = 0; i < events; i++) {







|
<
<
|
<
<
<
<
<
<
<







124
125
126
127
128
129
130
131


132







133
134
135
136
137
138
139

	objc_autoreleasePoolPop(pool);

	events = kevent(kernelQueue, [changeList items],
	    (int)[changeList count], eventList, EVENTLIST_SIZE,
	    (timeout == -1 ? NULL : &timespec));

	if (events < 0)


		return NO;








	[changeList removeAllItems];

	if (events == 0)
		return NO;

	for (i = 0; i < events; i++) {