[asterisk-commits] branch oej/multiparking r12429 - in
/team/oej/multiparking: ./ channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 7 14:18:42 MST 2006
Author: oej
Date: Tue Mar 7 15:18:39 2006
New Revision: 12429
URL: http://svn.digium.com/view/asterisk?rev=12429&view=rev
Log:
Reset automerge, resolve conflict
Modified:
team/oej/multiparking/ (props changed)
team/oej/multiparking/channels/chan_sip.c
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
automerge = FeelTheForce
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Mar 7 15:18:39 2006
@@ -1,1 +1,1 @@
-/trunk:1-12385
+/trunk:1-12428
Modified: team/oej/multiparking/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_sip.c?rev=12429&r1=12428&r2=12429&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_sip.c (original)
+++ team/oej/multiparking/channels/chan_sip.c Tue Mar 7 15:18:39 2006
@@ -12057,15 +12057,20 @@
/*! \brief Set peer defaults before configuring specific configurations */
static void set_peer_defaults(struct sip_peer *peer)
{
- peer->expire = -1;
- peer->pokeexpire = -1;
+ if (peer->expire == 0) {
+ /* Don't reset expire or port time during reload
+ if we have an active registration
+ */
+ peer->expire = -1;
+ peer->pokeexpire = -1;
+ peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
+ }
ast_copy_flags(peer, &global_flags, SIP_FLAGS_TO_COPY);
strcpy(peer->context, default_context);
strcpy(peer->subscribecontext, default_subscribecontext);
strcpy(peer->language, default_language);
strcpy(peer->musicclass, default_musicclass);
strcpy(peer->parkinglot, default_parkinglot);
- peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
peer->addr.sin_family = AF_INET;
peer->defaddr.sin_family = AF_INET;
peer->capability = global_capability;
@@ -12145,8 +12150,6 @@
else
speerobjs++;
ASTOBJ_INIT(peer);
- peer->expire = -1;
- peer->pokeexpire = -1;
}
/* Note that our peer HAS had its reference count incrased */
@@ -12154,12 +12157,9 @@
oldha = peer->ha;
peer->ha = NULL;
set_peer_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