ObjFW  Check-in [92344de237]

Overview
Comment:OFKernelEventObserver_kqueue: More error checking
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 92344de237323cc0612311179e2daec24bb5a1cc2a36ffe901e4dda9b7a612d4
User & Date: js on 2015-05-08 21:13:52
Other Links: manifest | tags
Context
2015-05-09
18:13
More OFKernelEventObserver refactoring check-in: 220513a3f5 user: js tags: trunk
2015-05-08
21:13
OFKernelEventObserver_kqueue: More error checking check-in: 92344de237 user: js tags: trunk
2015-05-07
19:17
utils/ofhttp: Fix a wrong type check-in: ce7b92cbcf user: js tags: trunk
Changes

Modified src/OFKernelEventObserver_kqueue.m from [cfe0087621] to [dac9f53f6d].

182
183
184
185
186
187
188





189
190
191
192
193
194
195
	[_changeList removeAllItems];
	[_removedArray removeAllObjects];

	if (events == 0)
		return false;

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





		if (eventList[i].ident == _cancelFD[0]) {
			char buffer;

			assert(eventList[i].filter == EVFILT_READ);
			OF_ENSURE(read(_cancelFD[0], &buffer, 1) == 1);

			continue;







>
>
>
>
>







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
	[_changeList removeAllItems];
	[_removedArray removeAllObjects];

	if (events == 0)
		return false;

	for (i = 0; i < events; i++) {
		if (eventList[i].flags & EV_ERROR)
			@throw [OFObserveFailedException
			    exceptionWithObserver: self
					    errNo: (int)eventList[i].data];

		if (eventList[i].ident == _cancelFD[0]) {
			char buffer;

			assert(eventList[i].filter == EVFILT_READ);
			OF_ENSURE(read(_cancelFD[0], &buffer, 1) == 1);

			continue;