[asterisk-commits] branch oej/test-this-branch r12426 - in /team/oej/test-this-branch: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 7 14:09:29 MST 2006


Author: oej
Date: Tue Mar  7 15:09:27 2006
New Revision: 12426

URL: http://svn.digium.com/view/asterisk?rev=12426&view=rev
Log:
Resolve conflict, reset automerge

Modified:
    team/oej/test-this-branch/   (props changed)
    team/oej/test-this-branch/channels/chan_sip.c

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
    automerge = cool

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Mar  7 15:09:27 2006
@@ -1,1 +1,1 @@
-/trunk:1-12394
+/trunk:1-12425

Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=12426&r1=12425&r2=12426&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Tue Mar  7 15:09:27 2006
@@ -12137,15 +12137,20 @@
 /*! \brief Set device defaults before configuring specific configurations */
 static void set_device_defaults(struct sip_peer *device)
 {
-	device->expire = -1;
-	device->pokeexpire = -1;
+	if (peer->expire == 0) {
+		/* Don't reset expire or port time during reload 
+		   if we have an active registration 
+		*/
+		device->expire = -1;
+		device->pokeexpire = -1;
+		device->addr.sin_port = htons(DEFAULT_SIP_PORT);
+	}
 	ast_copy_flags(device, &global_flags, SIP_FLAGS_TO_COPY);
 	strcpy(device->context, default_context);
 	strcpy(device->subscribecontext, default_subscribecontext);
 	strcpy(device->language, default_language);
 	strcpy(device->musicclass, default_musicclass);
 	strcpy(device->parkinglot, default_parkinglot);
-	device->addr.sin_port = htons(DEFAULT_SIP_PORT);
 	device->addr.sin_family = AF_INET;
 	device->defaddr.sin_family = AF_INET;
 	device->capability = global_capability;
@@ -12326,8 +12331,6 @@
 		else
 			speerobjs++;
 		ASTOBJ_INIT(peer);
-		peer->expire = -1;
-		peer->pokeexpire = -1;
 	}
 	peer->type &= SIP_PEER;
 
@@ -12337,12 +12340,9 @@
 	oldha = peer->ha;
 	peer->ha = NULL;
 	set_device_defaults(peer);	/* Set peer defaults */
-	if (!found) {
-		if (name)
+	if (!found && name)
 			ast_copy_string(peer->name, name, sizeof(peer->name));
-		peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
-		peer->addr.sin_family = AF_INET;
-	}
+
 	/* If we have channel variables, remove them (reload) */
 	if (peer->chanvars) {
 		ast_variables_destroy(peer->chanvars);



More information about the asterisk-commits mailing list