[asterisk-commits] branch oej/issue5898 - r8630 in
/team/oej/issue5898: ./ channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 25 01:54:35 MST 2006
Author: oej
Date: Wed Jan 25 02:54:33 2006
New Revision: 8630
URL: http://svn.digium.com/view/asterisk?rev=8630&view=rev
Log:
Adding debug output
Modified:
team/oej/issue5898/ (props changed)
team/oej/issue5898/channels/chan_sip.c
Propchange: team/oej/issue5898/
------------------------------------------------------------------------------
svnmerge-integrated = /trunk:1-8627
Modified: team/oej/issue5898/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/issue5898/channels/chan_sip.c?rev=8630&r1=8629&r2=8630&view=diff
==============================================================================
--- team/oej/issue5898/channels/chan_sip.c (original)
+++ team/oej/issue5898/channels/chan_sip.c Wed Jan 25 02:54:33 2006
@@ -1632,6 +1632,9 @@
/*! \brief sip_destroy_peer: Destroy peer object from memory */
static void sip_destroy_peer(struct sip_peer *peer)
{
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Destroying SIP peer %s\n", peer->name);
+
/* Delete it, it needs to disappear */
if (peer->call)
sip_destroy(peer->call);
@@ -2086,10 +2089,15 @@
static void sip_registry_destroy(struct sip_registry *reg)
{
/* Really delete */
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Destroying registry entry for %s@%s\n", reg->username, reg->hostname);
+
if (reg->call) {
/* Clear registry before destroying to ensure
we don't get reentered trying to grab the registry lock */
reg->call->registry = NULL;
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Destroying active SIP dialog for registry %s@%s\n", reg->username, reg->hostname);
sip_destroy(reg->call);
}
if (reg->expire > -1)
@@ -2108,8 +2116,8 @@
struct sip_pvt *cur, *prev = NULL;
struct sip_pkt *cp;
- if (sip_debug_test_pvt(p))
- ast_verbose("Destroying SIP dialog '%s' Method: %s\n", p->callid, sip_methods[p->method].text);
+ if (sip_debug_test_pvt(p) || option_debug > 2)
+ ast_verbose("Really destroying SIP dialog '%s' Method: %s\n", p->callid, sip_methods[p->method].text);
if (dumphistory)
sip_dump_history(p);
@@ -2180,6 +2188,7 @@
if (p->initid > -1)
ast_sched_del(sched, p->initid);
+ /* remove all current packets in this dialog */
while((cp = p->packets)) {
p->packets = p->packets->next;
if (cp->retransid > -1) {
@@ -2291,6 +2300,8 @@
static void sip_destroy(struct sip_pvt *p)
{
ast_mutex_lock(&iflock);
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Destroying SIP dialog %s\n", p->callid);
__sip_destroy(p, 1);
ast_mutex_unlock(&iflock);
}
@@ -13038,19 +13049,31 @@
/*! \brief sip_do_reload: Reload module */
static int sip_do_reload(enum channelreloadreason reason)
{
+ if (option_debug > 3)
+ ast_log(LOG_DEBUG, "--------------- SIP reload started\n");
+
clear_realm_authentication(authl);
clear_sip_domains();
authl = NULL;
ASTOBJ_CONTAINER_DESTROYALL(&userl, sip_destroy_user);
ASTOBJ_CONTAINER_DESTROYALL(®l, sip_registry_destroy);
+ if (option_debug > 3)
+ ast_log(LOG_DEBUG, "--------------- Done destroying registry list\n");
ASTOBJ_CONTAINER_MARKALL(&peerl);
reload_config(reason);
+
/* Prune peers who still are supposed to be deleted */
ASTOBJ_CONTAINER_PRUNE_MARKED(&peerl, sip_destroy_peer);
+ /* Send qualify (OPTIONS) to all peers */
sip_poke_all_peers();
+
+ /* Register with all services */
sip_send_all_registers();
+
+ if (option_debug > 3)
+ ast_log(LOG_DEBUG, "--------------- SIP reload done\n");
return 0;
}
More information about the asterisk-commits
mailing list