summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-11-08 15:28:39 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-11-08 15:28:39 +0000
commite108453e02944547fb62588b4e66c0c35ba96ace (patch)
tree4db7b50bb9029d0f83ba6b116404b7235f53d74c
parent5e610776328f1d51a25346d5b310f26f32a203a4 (diff)
coding guidelines, coding guidelines, coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b2a0e7bb3..37a1e1b8b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2898,24 +2898,27 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout)
ast_log(LOG_DEBUG, "Outgoing Call for %s\n", p->username);
res = update_call_counter(p, INC_CALL_RINGING);
- if ( res != -1 ) {
- p->callingpres = ast->cid.cid_pres;
- p->jointcapability = ast_translate_available_formats(p->capability, p->prefcodec);
- /* If there are no audio formats left to offer, punt */
- if (!(p->jointcapability & AST_FORMAT_AUDIO_MASK)) {
- ast_log(LOG_WARNING, "No audio format found to offer. Cancelling call to %s\n", p->username);
- res = -1;
- } else {
- p->t38.jointcapability = p->t38.capability;
- if (option_debug > 1)
- ast_log(LOG_DEBUG,"Our T38 capability (%d), joint T38 capability (%d)\n", p->t38.capability, p->t38.jointcapability);
- transmit_invite(p, SIP_INVITE, 1, 2);
+ if (res == -1)
+ return res;
- /* Initialize auto-congest time */
- p->initid = ast_sched_add(sched, SIP_TRANS_TIMEOUT, auto_congest, p);
- }
+ p->callingpres = ast->cid.cid_pres;
+ p->jointcapability = ast_translate_available_formats(p->capability, p->prefcodec);
+
+ /* If there are no audio formats left to offer, punt */
+ if (!(p->jointcapability & AST_FORMAT_AUDIO_MASK)) {
+ ast_log(LOG_WARNING, "No audio format found to offer. Cancelling call to %s\n", p->username);
+ res = -1;
+ } else {
+ p->t38.jointcapability = p->t38.capability;
+ if (option_debug > 1)
+ ast_log(LOG_DEBUG,"Our T38 capability (%d), joint T38 capability (%d)\n", p->t38.capability, p->t38.jointcapability);
+ transmit_invite(p, SIP_INVITE, 1, 2);
+
+ /* Initialize auto-congest time */
+ p->initid = ast_sched_add(sched, SIP_TRANS_TIMEOUT, auto_congest, p);
}
+
return res;
}