[hackers] [libixp] Check srv->running after running srv->preselect and timers. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sat, 29 May 2010 18:07:45 +0000 (UTC)

changeset: 122:1fbbdd3ecf0b
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Sat May 29 14:07:14 2010 -0400
files: lib/libixp/convert.c lib/libixp/server.c
description:
Check srv->running after running srv->preselect and timers.

diff -r b2b7cb840090 -r 1fbbdd3ecf0b lib/libixp/convert.c
--- a/lib/libixp/convert.c Mon May 24 15:25:19 2010 -0400
+++ b/lib/libixp/convert.c Sat May 29 14:07:14 2010 -0400
@@ -153,7 +153,7 @@
                         memcpy(*data, msg->pos, len);
                 }else
                         memcpy(msg->pos, *data, len);
- }
+ }
         msg->pos += len;
 }
 
diff -r b2b7cb840090 -r 1fbbdd3ecf0b lib/libixp/server.c
--- a/lib/libixp/server.c Mon May 24 15:25:19 2010 -0400
+++ b/lib/libixp/server.c Sat May 29 14:07:14 2010 -0400
@@ -151,6 +151,9 @@
                         tvp = &tv;
                 }
 
+ if(!s->running)
+ break;
+
                 prepare_select(s);
                 r = thread->select(s->maxfd + 1, &s->rd, 0, 0, tvp);
                 if(r < 0) {
Received on Sat May 29 2010 - 18:07:45 UTC

This archive was generated by hypermail 2.2.0 : Sat May 29 2010 - 18:12:04 UTC