libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

commit 1dccae5fd26477f0908e2d1a1b651bea3de98d35
parent f19525a1d267e1407ebbec510e56c8c0a24b725c
Author: Kris Maglione <kris@suckless.org>
Date:   Sat, 29 May 2010 14:07:14 -0400

Check srv->running after running srv->preselect and timers.

Diffstat:
lib/libixp/convert.c | 2+-
lib/libixp/server.c | 3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/libixp/convert.c b/lib/libixp/convert.c @@ -153,7 +153,7 @@ ixp_pdata(IxpMsg *msg, char **data, uint len) { memcpy(*data, msg->pos, len); }else memcpy(msg->pos, *data, len); - } + } msg->pos += len; } diff --git a/lib/libixp/server.c b/lib/libixp/server.c @@ -151,6 +151,9 @@ ixp_serverloop(IxpServer *s) { tvp = &tv; } + if(!s->running) + break; + prepare_select(s); r = thread->select(s->maxfd + 1, &s->rd, 0, 0, tvp); if(r < 0) {