ObjFW  Diff

Differences From Artifact [6b86d2ab72]:

To Artifact [57b253b8a0]:

  • File src/OFKernelEventObserver.m — part of check-in [f9ceddcb7d] at 2015-04-26 10:42:58 on branch trunk — 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. (user: js, size: 9210) [annotate] [blame] [check-ins using]


325
326
327
328
329
330
331

332
333




334
335
336
337
338
339
340
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: Maybe downsize? */
				_FDToObject[fd] = nil;
				 * 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];