--- asterisk/channels/chan_sip.c_20040225 Wed Feb 25 00:54:47 2004 +++ asterisk/channels/chan_sip.c Wed Feb 25 00:53:00 2004 @@ -3796,6 +3796,10 @@ 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; @@ -3815,10 +3819,6 @@ 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;