Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 116343 | Differences between
and this patch

Collapse All | Expand All

(-)libnbio-0.30.orig/src/libnbio.c (-5 / +6 lines)
Lines 532-551 Link Here
532
/* Do all cleanups that are normally done in nbio_poll */
532
/* Do all cleanups that are normally done in nbio_poll */
533
int nbio_cleanuponly(nbio_t *nb)
533
int nbio_cleanuponly(nbio_t *nb)
534
{
534
{
535
	nbio_fd_t *cur = NULL, **prev = NULL;
535
	nbio_fd_t *cur = (nbio_fd_t *)nb->fdlist;
536
536
537
	for (prev = (nbio_fd_t **)&nb->fdlist; (cur = *prev); ) {
537
	while (cur) {
538
538
539
		if (cur->flags & NBIO_FDT_FLAG_CLOSED) {
539
		if (cur->flags & NBIO_FDT_FLAG_CLOSED) {
540
			*prev = cur->next;
540
			nbio_fd_t *prev = cur;
541
			__fdt_free(cur);
541
			cur = cur->next;
542
			__fdt_free(prev);
542
			continue;
543
			continue;
543
		}
544
		}
544
545
545
		if ((cur->flags & NBIO_FDT_FLAG_CLOSEONFLUSH) && !cur->txchain)
546
		if ((cur->flags & NBIO_FDT_FLAG_CLOSEONFLUSH) && !cur->txchain)
546
			cur->handler(nb, NBIO_EVENT_EOF, cur);
547
			cur->handler(nb, NBIO_EVENT_EOF, cur);
547
548
548
		prev = &cur->next;
549
		cur = cur->next;
549
	}
550
	}
550
551
551
	return 0;
552
	return 0;
(-)libnbio-0.30.orig/src/poll.c (-6 / +7 lines)
Lines 227-245 Link Here
227
	}
227
	}
228
228
229
	for (curpri = nb->maxpri; curpri >= 0; curpri--) {
229
	for (curpri = nb->maxpri; curpri >= 0; curpri--) {
230
		nbio_fd_t *cur = NULL, **prev = NULL;
230
		nbio_fd_t *cur = (nbio_fd_t *)nb->fdlist;
231
231
232
		for (prev = (nbio_fd_t **)&nb->fdlist; (cur = *prev); ) {
232
		while (cur) {
233
			struct pollfd *pfd;
233
			struct pollfd *pfd;
234
234
235
			if (cur->flags & NBIO_FDT_FLAG_CLOSED) {
235
			if (cur->flags & NBIO_FDT_FLAG_CLOSED) {
236
				*prev = cur->next;
236
				nbio_fd_t *prev = cur;
237
				__fdt_free(cur);
237
				cur = cur->next;
238
				__fdt_free(prev);
238
				continue;
239
				continue;
239
			}
240
			}
240
241
241
			if (cur->pri != curpri) {
242
			if (cur->pri != curpri) {
242
				prev = &cur->next;
243
				cur = cur->next;
243
				continue;
244
				continue;
244
			}
245
			}
245
246
Lines 269-275 Link Here
269
			if (__fdt_ready_all(nb, cur) == -1)
270
			if (__fdt_ready_all(nb, cur) == -1)
270
				return -1;
271
				return -1;
271
272
272
			prev = &cur->next;
273
			cur = cur->next;
273
		}
274
		}
274
	}
275
	}
275
276
(-)libnbio-0.30.orig/src/resolv.c (+1 lines)
Lines 386-390 Link Here
386
 */
386
 */
387
int nbio_resolv__looppass(nbio_t *nb)
387
int nbio_resolv__looppass(nbio_t *nb)
388
{
388
{
389
	return -1;
389
}
390
}
390
391

Return to bug 116343