commit f0356de610ab5793c27f1f43f6f507138dd00a04
parent aa5213f0f939fea954a896327a0674d711998afd
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Thu, 8 Jun 2006 22:33:12 +0200
fixed handle_conns to prevent the crashing bug
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libixp/server.c b/libixp/server.c
@@ -65,11 +65,14 @@ prepare_select(IXPServer *s)
static void
handle_conns(IXPServer *s)
{
- IXPConn *c;
- for(c=s->conn; c; c=c->next)
+ IXPConn *c = s->conn, *n;
+ while(c) {
+ n = c->next;
if(FD_ISSET(c->fd, &s->rd) && c->read)
/* call read handler */
c->read(c);
+ c = n;
+ }
}
char *