[Asterisk-cvs] asterisk/channels chan_sip.c,1.292.2.10,1.292.2.11

markster at lists.digium.com markster at lists.digium.com
Fri Feb 27 11:17:25 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv14324/channels

Modified Files:
      Tag: v1-0_stable
	chan_sip.c 
Log Message:
Fix typos in -stable (bug #1122)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.292.2.10
retrieving revision 1.292.2.11
diff -u -d -r1.292.2.10 -r1.292.2.11
--- chan_sip.c	25 Feb 2004 01:15:05 -0000	1.292.2.10
+++ chan_sip.c	27 Feb 2004 16:06:48 -0000	1.292.2.11
@@ -700,7 +700,7 @@
 		mysql_real_escape_string(mysql, name, peer, strlen(peer));
 		mysql_real_escape_string(mysql, uname, username, strlen(username));
 		snprintf(query, sizeof(query), "UPDATE sipfriends SET ipaddr=\"%s\", port=\"%d\", regseconds=\"%ld\", username=\"%s\" WHERE name=\"%s\"", 
-			inet_ntoa(sin->sin_addr), ntohs(sin->sin_port), nowtime, uname + expiry, name);
+			inet_ntoa(sin->sin_addr), ntohs(sin->sin_port), nowtime + expiry, uname, name);
 		ast_mutex_lock(&mysqllock);
 		if (mysql_real_query(mysql, query, strlen(query))) 
 			ast_log(LOG_WARNING, "Unable to update database\n");
@@ -3795,11 +3795,11 @@
 					sip_cancel_destroy(p);
 					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
-				} else {
 						/* Say OK and ask subsystem to retransmit msg counter */
 						transmit_response_with_date(p, "200 OK", req);
 						peer->lastmsgssent = -1;




More information about the svn-commits mailing list