projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
526410b
)
SafeTimer: check the IPC struct before trying to send a kill to the server in the...
author
Wilfried Goesgens
<dothebart@citadel.org>
Wed, 4 Jan 2012 07:59:59 +0000
(08:59 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Wed, 4 Jan 2012 07:59:59 +0000
(08:59 +0100)
citadel/utils/sendcommand.c
patch
|
blob
|
history
diff --git
a/citadel/utils/sendcommand.c
b/citadel/utils/sendcommand.c
index e562602af3b5bf28494e3b2cd7ea3a4e9c28d398..c0870f62bfb046c2a6fe4c160c85db90f2256d64 100644
(file)
--- a/
citadel/utils/sendcommand.c
+++ b/
citadel/utils/sendcommand.c
@@
-98,8
+98,12
@@
void cleanup(int e)
alarm(30);
signal(SIGALRM, nq_cleanup);
- serv_write(ipc, "\n", 1);
- if (nested++ < 1)
+ if ((ipc != NULL) &&
+ (ipc->sock > 0))
+ serv_write(ipc, "\n", 1);
+ if ((nested++ < 1) &&
+ (ipc != NULL) &&
+ (ipc->sock > 0))
CtdlIPCQuit(ipc);
nq_cleanup(e);
}