From a809376df83fc16b31c3e3cd827d9364b2a3b996 Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 29 Jun 2004 13:52:03 +0000 Subject: [PATCH] Display invalid extension when there is one, fix minor OSP typo, Don't send 200 OK after 403 Forbidden on SUBSCRIBE git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3349 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 2 +- pbx.c | 2 +- res/res_osp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d599a0d22..28b0ad9af 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7079,7 +7079,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc if (!ignore && p) p->lastinvite = seqno; - if (p) { + if (p && !p->needdestroy) { if (!(p->expiry = atoi(get_header(req, "Expires")))) { transmit_response(p, "200 OK", req); p->needdestroy = 1; diff --git a/pbx.c b/pbx.c index 7344dd328..f96e7de8c 100755 --- a/pbx.c +++ b/pbx.c @@ -1878,7 +1878,7 @@ int ast_pbx_run(struct ast_channel *c) strncpy(c->exten, "i", sizeof(c->exten)-1); c->priority = 1; } else { - ast_log(LOG_WARNING, "Invalid extension, but no rule 'i' in context '%s'\n", c->context); + ast_log(LOG_WARNING, "Invalid extension '%s', but no rule 'i' in context '%s'\n", exten, c->context); goto out; } } else { diff --git a/res/res_osp.c b/res/res_osp.c index 9aa8d66da..94aaaf333 100755 --- a/res/res_osp.c +++ b/res/res_osp.c @@ -452,7 +452,7 @@ int ast_osp_validate(char *provider, char *token, int *handle, unsigned int *tim } callerid = l; ast_mutex_lock(&osplock); - ast_inet_ntoa(ip, sizeof(ip), addr)); + ast_inet_ntoa(ip, sizeof(ip), addr); osp = providers; while(osp) { if (!strcasecmp(osp->name, provider)) {