From: Russell Bryant Date: Tue, 13 Feb 2007 19:42:00 +0000 (+0000) Subject: If we fail to create the SIP socket, then return -1 from reload_config() so X-Git-Tag: 1.4.1~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b100b697033b65d950eabf0d230e1ad8e0765d32;p=thirdparty%2Fasterisk.git If we fail to create the SIP socket, then return -1 from reload_config() so that load_module() will return AST_MODULE_LOAD_DECLINE. Otherwise, the console will just get spammed with error messages every time chan_sip tries to send a message. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@54204 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2d491d46a6..c565e087bc 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16510,6 +16510,7 @@ static int reload_config(enum channelreloadreason reason) sipsock = socket(AF_INET, SOCK_DGRAM, 0); if (sipsock < 0) { ast_log(LOG_WARNING, "Unable to create SIP socket: %s\n", strerror(errno)); + return -1; } else { /* Allow SIP clients on the same host to access us: */ const int reuseFlag = 1;