From e7eef98133f04c94aa567f837ba979d2de852e6a Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Fri, 28 Mar 2003 23:06:14 +0000 Subject: [PATCH] fixes --- src/proxy.c | 2 +- src/rewrite_rules.h | 8 ++++---- src/sip_utils.c | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index 7312585..e4e4f3d 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -140,7 +140,7 @@ int proxy_request (sip_t *request) { case REQTYP_INCOMING: /* rewrite request URI to point to the real host */ /* i still holds the valid index into the URLMAP table */ - if (check_rewrite_rq_uri(request)) { + if (check_rewrite_rq_uri(request)==STS_TRUE) { proxy_rewrite_request_uri(request, i); } diff --git a/src/rewrite_rules.h b/src/rewrite_rules.h index ff842ff..6abca94 100644 --- a/src/rewrite_rules.h +++ b/src/rewrite_rules.h @@ -39,11 +39,11 @@ static struct { T S O E R F C A K E T N L Y R G */ -{"Linphone", {-1, -1, -1, -1, -1, -1. -1, -1, -1, -1, -1, -1}}, -{"Windows RTC", {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, -{"KPhone", {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, +{"oSIP/Linphone",{-1, -1, -1, -1, -1, -1. -1, -1, -1, -1, -1, -1}}, +{"Windows RTC", {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, +{"KPhone", {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, /* the following line holds the default entries */ -{NULL, { 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1}} +{NULL, { 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1}} }; static struct { diff --git a/src/sip_utils.c b/src/sip_utils.c index 9f28fd0..abe45d6 100644 --- a/src/sip_utils.c +++ b/src/sip_utils.c @@ -334,7 +334,7 @@ int check_rewrite_rq_uri (sip_t *sip) { /* check fort existence of method */ if ((sip==NULL) || (sip->strtline==NULL) || - (sip->strtline->sipmethod)) { + (sip->strtline->sipmethod==NULL)) { ERROR("check_rewrite_rq_uri: got NULL method"); return STS_FALSE; } @@ -364,13 +364,15 @@ int check_rewrite_rq_uri (sip_t *sip) { } else { sts = (RQ_rewrite[dflidx].action[j])? STS_TRUE: STS_FALSE; } - DEBUGC(DBCLASS_SIP, "check_rewrite_rq_uri: [%s/%s] got action %i", - sip->strtline->sipmethod, ua_hdr->hvalue); + DEBUGC(DBCLASS_SIP, "check_rewrite_rq_uri: [%s:%s, i=%i, j=%i] " + "got action %s", + sip->strtline->sipmethod, ua_hdr->hvalue, i, j, + (sts==STS_TRUE)? "rewrite":"norewrite"); return sts; } } /* for j */ - WARN("check_rewrite_rq_uri: did'nt get a hit of the method [%s]", + WARN("check_rewrite_rq_uri: didn't get a hit of the method [%s]", sip->strtline->sipmethod); return STS_FALSE; }