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;
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;