ObjFW  Check-in [f9ceddcb7d]

Overview
Comment:OFKernelEventObserver: Keep FD -> object mapping

Removing the FD from the FD -> object mapping results in
OF_processReadBuffers passing nil to objectIsReadyForReading: if there's
still something in the read buffer.

Additionally, this also broke when observing the same object for reading
and writing and then removing it for either reading or writing.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f9ceddcb7d30a717e8d0288ca33ba6e81f257cabe6f8b2956388976b0c8c23f1
User & Date: js on 2015-04-26 10:42:58
Other Links: manifest | tags
Context
2015-04-26
12:24
Add utils/ofhttp check-in: 486073790c user: js tags: trunk
10:42
OFKernelEventObserver: Keep FD -> object mapping check-in: f9ceddcb7d user: js tags: trunk
10:40
OFKernelEventObserver: Rename a private method check-in: bd05eb8de3 user: js tags: trunk
Changes

Modified src/OFKernelEventObserver.m from [6b86d2ab72] to [57b253b8a0].

325
326
327
328
329
330
331

332
333


334
335
336
337
338
339
340
						   count: _maxFD + 1];
				}

				_FDToObject[fd] = object;
			}

			if ((action & QUEUE_ACTION) == QUEUE_REMOVE) {

				/* FIXME: Maybe downsize? */
				_FDToObject[fd] = nil;


			}

			switch (action) {
			case QUEUE_ADD | QUEUE_READ:
				[_readObjects addObject: object];

				[self OF_addFileDescriptorForReading: fd];







>
|
|
>
>







325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
						   count: _maxFD + 1];
				}

				_FDToObject[fd] = object;
			}

			if ((action & QUEUE_ACTION) == QUEUE_REMOVE) {
				/*
				 * FIXME: What to do? There might still be an
				 *	  object that has data in the read
				 *	  buffer and needs the map!
				 */
			}

			switch (action) {
			case QUEUE_ADD | QUEUE_READ:
				[_readObjects addObject: object];

				[self OF_addFileDescriptorForReading: fd];