mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
make tcp socket resuable. Bug #262
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2558,8 +2558,8 @@ static int reload_config(void)
|
||||
}
|
||||
if (skinnysock < 0) {
|
||||
skinnysock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if(!setsockopt(skinnysock,SOL_SOCKET,SO_REUSEADDR,&on,0)) {
|
||||
ast_log(LOG_ERROR, "Set Socket Options failed: %s", strerror(errno));
|
||||
if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
|
||||
ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s", errno, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user