[asterisk-commits] branch oej/peermatch r11777 -
/team/oej/peermatch/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Mar 4 03:45:05 MST 2006
Author: oej
Date: Sat Mar 4 04:45:02 2006
New Revision: 11777
URL: http://svn.digium.com/view/asterisk?rev=11777&view=rev
Log:
Small changes after merging with test-this-branch
Modified:
team/oej/peermatch/channels/chan_sip.c
Modified: team/oej/peermatch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/channels/chan_sip.c?rev=11777&r1=11776&r2=11777&view=diff
==============================================================================
--- team/oej/peermatch/channels/chan_sip.c (original)
+++ team/oej/peermatch/channels/chan_sip.c Sat Mar 4 04:45:02 2006
@@ -944,7 +944,7 @@
static int sip_poke_peer(struct sip_peer *peer);
static int __sip_do_register(struct sip_registry *r);
static int restart_monitor(void);
-static void set_peer_defaults(struct sip_peer *peer);
+static void set_device_defaults(struct sip_peer *device);
static struct sip_peer *temp_peer(const char *name);
@@ -11843,36 +11843,36 @@
}
/*! \brief Set peer defaults before configuring specific configurations */
-static void set_peer_defaults(struct sip_peer *peer)
-{
- peer->expire = -1;
- peer->pokeexpire = -1;
- 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);
- peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
- peer->addr.sin_family = AF_INET;
- peer->defaddr.sin_family = AF_INET;
- peer->capability = global_capability;
- peer->rtptimeout = global_rtptimeout;
- peer->rtpholdtimeout = global_rtpholdtimeout;
- peer->rtpkeepalive = global_rtpkeepalive;
- strcpy(peer->vmexten, default_vmexten);
- ast_copy_flags(peer, &global_flags, SIP_USEREQPHONE);
- peer->secret[0] = '\0';
- peer->md5secret[0] = '\0';
- peer->cid_num[0] = '\0';
- peer->cid_name[0] = '\0';
- peer->fromdomain[0] = '\0';
- peer->fromuser[0] = '\0';
- peer->regexten[0] = '\0';
- peer->mailbox[0] = '\0';
- peer->callgroup = 0;
- peer->pickupgroup = 0;
- peer->maxms = default_qualify;
- peer->prefs = default_prefs;
+static void set_device_defaults(struct sip_peer *device)
+{
+ device->expire = -1;
+ device->pokeexpire = -1;
+ 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;
+ device->rtptimeout = global_rtptimeout;
+ device->rtpholdtimeout = global_rtpholdtimeout;
+ device->rtpkeepalive = global_rtpkeepalive;
+ strcpy(device->vmexten, default_vmexten);
+ ast_copy_flags(device, &global_flags, SIP_USEREQPHONE);
+ device->secret[0] = '\0';
+ device->md5secret[0] = '\0';
+ device->cid_num[0] = '\0';
+ device->cid_name[0] = '\0';
+ device->fromdomain[0] = '\0';
+ device->fromuser[0] = '\0';
+ device->regexten[0] = '\0';
+ device->mailbox[0] = '\0';
+ device->callgroup = 0;
+ device->pickupgroup = 0;
+ device->maxms = default_qualify;
+ device->prefs = default_prefs;
}
@@ -11896,7 +11896,7 @@
ast_copy_string(user->name, name, sizeof(user->name));
oldha = user->ha;
user->ha = NULL;
- set_peer_defaults(user); /* Set default values for this object */
+ set_device_defaults(user); /* Set default values for this object */
for (; v; v = v->next) {
if (handle_common_options(&userflags, &mask, v))
continue;
@@ -11970,7 +11970,8 @@
apeerobjs++;
ASTOBJ_INIT(peer);
- set_peer_defaults(peer);
+ peer->type = SIP_PEER;
+ set_device_defaults(peer);
ast_copy_string(peer->name, name, sizeof(peer->name));
@@ -12027,7 +12028,7 @@
peer->lastmsgssent = -1;
oldha = peer->ha;
peer->ha = NULL;
- set_peer_defaults(peer); /* Set peer defaults */
+ set_device_defaults(peer); /* Set peer defaults */
if (!found) {
if (name)
ast_copy_string(peer->name, name, sizeof(peer->name));
More information about the asterisk-commits
mailing list