Don't attempt to qualify before we have a socket (bug #2331)
authorMark Spencer <markster@digium.com>
Tue, 7 Sep 2004 14:40:34 +0000 (14:40 +0000)
committerMark Spencer <markster@digium.com>
Tue, 7 Sep 2004 14:40:34 +0000 (14:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ef26c29..f64d71f 100755 (executable)
@@ -8314,7 +8314,7 @@ static struct sip_peer *build_peer(char *name, struct ast_variable *v)
                         */
                        v=v->next;
                }
                         */
                        v=v->next;
                }
-               if (!found && peer->dynamic)
+               if (!found && peer->dynamic && (sipsock > -1))
                        reg_source_db(peer);
                peer->delme = 0;
        }
                        reg_source_db(peer);
                peer->delme = 0;
        }