projects
/
lcr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b11cdb
)
Fixed chan_lcr unload bug, found by Patrick
author
Andreas Eversberg
<jolly@eversberg.eu>
Thu, 1 Mar 2012 07:40:28 +0000
(08:40 +0100)
committer
Andreas Eversberg
<jolly@eversberg.eu>
Thu, 1 Mar 2012 07:40:28 +0000
(08:40 +0100)
chan_lcr.c
patch
|
blob
|
history
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;
+ /* socket not created */
+ if (lcr_sock < 0)
+ return;
+
unregister_fd(&socket_fd);
/* flush pending messages */
@@
-1853,8
+1857,7
@@
void close_socket(void)
admin_first = NULL;
/* close socket */
- if (lcr_sock >= 0)
- close(lcr_sock);
+ close(lcr_sock);
lcr_sock = -1;
global_change = 1;
}