Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ecd4208
)
htparser: Make plexwatch shut up a bit.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 3 Feb 2013 02:09:41 +0000
(
03:09
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 3 Feb 2013 02:09:41 +0000
(
03:09
+0100)
src/htparser.c
patch
|
blob
|
blame
|
history
diff --git
a/src/htparser.c
b/src/htparser.c
index
de5bbc2
..
1dbb8ee
100644
(file)
--- a/
src/htparser.c
+++ b/
src/htparser.c
@@
-405,8
+405,9
@@
static void plexwatch(struct muth *muth, va_list args)
{
vavar(int, fd);
char *buf;
{
vavar(int, fd);
char *buf;
- int i, ret;
+ int i,
s,
ret;
+ s = 0;
while(1) {
if(block(fd, EV_READ, 0) == 0)
break;
while(1) {
if(block(fd, EV_READ, 0) == 0)
break;
@@
-416,6
+417,7
@@
static void plexwatch(struct muth *muth, va_list args)
flog(LOG_WARNING, "received error on rootplex read channel: %s", strerror(errno));
exit(1);
} else if(ret == 0) {
flog(LOG_WARNING, "received error on rootplex read channel: %s", strerror(errno));
exit(1);
} else if(ret == 0) {
+ s = 1;
free(buf);
break;
}
free(buf);
break;
}
@@
-428,9
+430,11
@@
static void plexwatch(struct muth *muth, va_list args)
if(listeners.b[i] == muth)
bufdel(listeners, i);
}
if(listeners.b[i] == muth)
bufdel(listeners, i);
}
- flog(LOG_INFO, "root handler exited, so shutting down listening...");
- while(listeners.d > 0)
- resume(listeners.b[0], 0);
+ if(s) {
+ flog(LOG_INFO, "root handler exited, so shutting down listening...");
+ while(listeners.d > 0)
+ resume(listeners.b[0], 0);
+ }
}
static void initroot(void *uu)
}
static void initroot(void *uu)