projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed chan_lcr unload bug, found by Patrick
[lcr.git]
/
chan_lcr.c
diff --git
a/chan_lcr.c
b/chan_lcr.c
index
3cf892c
..
e8e2e7e
100644
(file)
--- a/
chan_lcr.c
+++ b/
chan_lcr.c
@@
-1841,6
+1841,10
@@
void close_socket(void)
{
struct admin_list *admin, *temp;
{
struct admin_list *admin, *temp;
+ /* socket not created */
+ if (lcr_sock < 0)
+ return;
+
unregister_fd(&socket_fd);
/* flush pending messages */
unregister_fd(&socket_fd);
/* flush pending messages */
@@
-1853,8
+1857,7
@@
void close_socket(void)
admin_first = NULL;
/* close socket */
admin_first = NULL;
/* close socket */
- if (lcr_sock >= 0)
- close(lcr_sock);
+ close(lcr_sock);
lcr_sock = -1;
global_change = 1;
}
lcr_sock = -1;
global_change = 1;
}