Bug # 1052 Got it this time..I'm sure of it ;)
authorMalcolm Davenport <malcolmd@digium.com>
Wed, 25 Feb 2004 01:16:45 +0000 (01:16 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Wed, 25 Feb 2004 01:16:45 +0000 (01:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 4252057..518a6f3 100755 (executable)
@@ -3796,7 +3796,11 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si
                                        if (parse_contact(p, peer, req)) {
                                                ast_log(LOG_WARNING, "Failed to parse contact info\n");
                                        } else {
-                                               /* Say OK and ask subsystem to retransmit msg counter */
+#ifdef MYSQL_FRIENDS
+                                       if (peer->temponly)
+                                               mysql_update_peer(peer->name, &peer->addr, peer->username, p->expiry);
+#endif                                                 
+                                       /* Say OK and ask subsystem to retransmit msg counter */
                                                transmit_response_with_date(p, "200 OK", req);
                                                peer->lastmsgssent = -1;
                                                res = 0;
@@ -3815,10 +3819,6 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si
                        if (parse_contact(p, peer, req)) {
                                ast_log(LOG_WARNING, "Failed to parse contact info\n");
                        } else {
-#ifdef MYSQL_FRIENDS
-                               if (peer->temponly)
-                                       mysql_update_peer(peer->name, &peer->addr, peer->username, p->expiry);
-#endif                                 
                                /* Say OK and ask subsystem to retransmit msg counter */
                                transmit_response_with_date(p, "200 OK", req);
                                peer->lastmsgssent = -1;