summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-06-08 20:30:20 +0000
committerOlle Johansson <oej@edvina.net>2006-06-08 20:30:20 +0000
commit36506dad2d4a988644e82107754ad260b371c955 (patch)
treed16222c44986b33215fbf0ef000ce9c51fce9d0c /channels/chan_sip.c
parent5f286add13628bb6df811165d94fdf612590ce04 (diff)
Debug logging fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ae8d14f44..06e728d6a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1108,7 +1108,6 @@ static int auto_congest(void *nothing);
static int update_call_counter(struct sip_pvt *fup, int event);
static int hangup_sip2cause(int cause);
static const char *hangup_cause2sip(int cause);
-static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *sin, const int intended_method);
int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual *current, struct sip_request *req, int seqno);
@@ -2876,8 +2875,6 @@ static int sip_hangup(struct ast_channel *ast)
ast_log(LOG_DEBUG, "Asked to hangup channel that was not connected\n");
return 0;
}
- if (option_debug && sipdebug)
- ast_log(LOG_DEBUG, "Hangup call %s, SIP callid %s)\n", ast->name, p->callid);
if (ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
if (option_debug >3)
@@ -3085,8 +3082,16 @@ static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
int ret = -1;
struct sip_pvt *p;
+ if (newchan && ast_test_flag(newchan, AST_FLAG_ZOMBIE))
+ ast_log(LOG_DEBUG, "New channel is zombie\n");
+ if (oldchan && ast_test_flag(oldchan, AST_FLAG_ZOMBIE))
+ ast_log(LOG_DEBUG, "Old channel is zombie\n");
+
if (!newchan || !newchan->tech_pvt) {
- ast_log(LOG_WARNING, "No SIP tech_pvt! Fixup of %s failed.\n", oldchan->name);
+ if (!newchan)
+ ast_log(LOG_WARNING, "No new channel! Fixup of %s failed.\n", oldchan->name);
+ else
+ ast_log(LOG_WARNING, "No SIP tech_pvt! Fixup of %s failed.\n", oldchan->name);
return -1;
}
p = newchan->tech_pvt;