[asterisk-commits] oej: branch oej/oolong-path-support-trunk r377375 - /team/oej/oolong-path-sup...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 7 04:56:56 CST 2012


Author: oej
Date: Fri Dec  7 04:56:51 2012
New Revision: 377375

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377375
Log:
Small fixes discovered while publishing a review

Modified:
    team/oej/oolong-path-support-trunk/channels/chan_sip.c

Modified: team/oej/oolong-path-support-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/oolong-path-support-trunk/channels/chan_sip.c?view=diff&rev=377375&r1=377374&r2=377375
==============================================================================
--- team/oej/oolong-path-support-trunk/channels/chan_sip.c (original)
+++ team/oej/oolong-path-support-trunk/channels/chan_sip.c Fri Dec  7 04:56:51 2012
@@ -16099,8 +16099,10 @@
 	/* We might not immediately be able to reconnect via TCP, but try caching it anyhow */
 	if (!peer->rt_fromcontact || !sip_cfg.peer_rtupdate) {
 		char path[SIPBUFSIZE*2];
-		make_route_list(peer->path, path, sizeof(path));
-		ast_db_put("SIP/RegistryPath", peer->name, path);
+		if (peer->path) {
+			make_route_list(peer->path, path, sizeof(path));
+			ast_db_put("SIP/RegistryPath", peer->name, path);
+		}
 		ast_db_put("SIP/Registry", peer->name, data);
 	}
 	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Registered\r\nAddress: %s\r\n", peer->name,  ast_sockaddr_stringify(&peer->addr));
@@ -16287,9 +16289,9 @@
 	}
 	*d = head;
 }
-/*! \brief Build route list from Path header 
+/*! \brief Build route list from Path header
  *  RFC 3327 requires that the Path header contains SIP URIs with lr paramter.
- *  Thus, we do not care about strict routers 
+ *  Thus, we do not care about strict routing SIP routers
  */
 static void build_path(struct sip_pvt *p, struct sip_peer *peer, struct sip_request *req, char *pathbuf)
 {




More information about the asterisk-commits mailing list