[asterisk-commits] branch oej/peermatch r12427 - in
/team/oej/peermatch: ./ channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 7 14:12:25 MST 2006
Author: oej
Date: Tue Mar 7 15:12:22 2006
New Revision: 12427
URL: http://svn.digium.com/view/asterisk?rev=12427&view=rev
Log:
reset automerge, resolve conflict
Modified:
team/oej/peermatch/ (props changed)
team/oej/peermatch/channels/chan_sip.c
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
automerge = hot
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Mar 7 15:12:22 2006
@@ -1,1 +1,1 @@
-/trunk:1-12386
+/trunk:1-12426
Modified: team/oej/peermatch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/channels/chan_sip.c?rev=12427&r1=12426&r2=12427&view=diff
==============================================================================
--- team/oej/peermatch/channels/chan_sip.c (original)
+++ team/oej/peermatch/channels/chan_sip.c Tue Mar 7 15:12:22 2006
@@ -11854,14 +11854,19 @@
/*! \brief Set peer 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);
- device->addr.sin_port = htons(DEFAULT_SIP_PORT);
device->addr.sin_family = AF_INET;
device->defaddr.sin_family = AF_INET;
device->capability = global_capability;
@@ -12027,8 +12032,6 @@
else
speerobjs++;
ASTOBJ_INIT(peer);
- peer->expire = -1;
- peer->pokeexpire = -1;
}
peer->type &= SIP_PEER;
@@ -12038,12 +12041,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