Minor SIP cleanup for poking on startup (bug #2331)
authorMark Spencer <markster@digium.com>
Tue, 31 Aug 2004 13:49:18 +0000 (13:49 +0000)
committerMark Spencer <markster@digium.com>
Tue, 31 Aug 2004 13:49:18 +0000 (13:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3690 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 50ea7b3..86675b7 100755 (executable)
@@ -4262,12 +4262,12 @@ static void reg_source_db(struct sip_peer *p)
                                        }
                                        ast_verbose(VERBOSE_PREFIX_3 "SIP Seeding '%s' at %s@%s:%d for %d\n", p->name, 
                                                p->username, ast_inet_ntoa(iabuf, sizeof(iabuf), in), atoi(c), atoi(d));
-                                       sip_poke_peer(p);
                                        expiry = atoi(d);
                                        memset(&p->addr, 0, sizeof(p->addr));
                                        p->addr.sin_family = AF_INET;
                                        p->addr.sin_addr = in;
                                        p->addr.sin_port = htons(atoi(c));
+                                       sip_poke_peer(p);
                                        if (p->expire > -1)
                                                ast_sched_del(sched, p->expire);
                                        p->expire = ast_sched_add(sched, (expiry + 10) * 1000, expire_register, (void *)p);