From 9939e41fa5dbc0bc852830a8fb3e7f0b20c8b853 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sat, 7 Sep 2002 21:29:45 +0000 Subject: [PATCH] redone V0.1.2 - silly bug in the registration concept --- ChangeLog | 20 +++++++++++--------- configure.in | 2 +- src/proxy.c | 25 ++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1274317..74a4554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,19 @@ 0.1.2 ===== -- 7-Sep-2002: Releases version 0.1.2 - Experimental RTP proxying feature (using pthreads) -- 26-Aug-2002: Optimized DNS caching +- 7-Sep-2002: - Releases version 0.1.2 + - fixed registration concept (SIP Contact header is not + a *must* to be present in every frame) + - Experimental RTP proxying feature (using pthreads) +- 26-Aug-2002: - Optimized DNS caching 0.1.1 ===== -- 25-Aug-2002: Released version 0.1.1 - can daemonize (detach and run in background) - do some DNS caching -- 24-Aug-2002: Imlemented support for a config file, - obsoletes siproxd_conf.h +- 25-Aug-2002: - Released version 0.1.1 + - can daemonize (detach and run in background) + - do some DNS caching +- 24-Aug-2002: - Imlemented support for a config file, + - obsoletes siproxd_conf.h 0.1.0 ===== -- 19-Aug-2002: Released version 0.1.0 +- 19-Aug-2002: - Released version 0.1.0 diff --git a/configure.in b/configure.in index 6b572d2..56cbbd8 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ dnl ****************************************************************** dnl SPD_MAJOR_VERSION=0 SPD_MINOR_VERSION=1 -SPD_MICRO_VERSION=3 +SPD_MICRO_VERSION=2 SPD_VERSION=$SPD_MAJOR_VERSION.$SPD_MINOR_VERSION.$SPD_MICRO_VERSION dnl ********************************************************************* diff --git a/src/proxy.c b/src/proxy.c index d5d6342..67e6bfe 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -60,7 +60,7 @@ int proxy_request (sip_t *request) { int sts; int type; struct in_addr addr; - contact_t *contact; +// contact_t *contact; /* contact header issue */ url_t *url; int port; char *buffer; @@ -77,12 +77,25 @@ int proxy_request (sip_t *request) { return 1; } +#if 0 /* Contact Header Issue */ /* figure out if this is an request comming from the outside * world to one of our registered clients ('to' == 'masq' URL) * or if this is a request sent by on e of our registered clients * ('from' == 'true' URL) */ msg_getcontact(request,0,&contact); + + /* seen with linphone-0.9.1pre1 w/ user-agent: oSIP/Linphone-0.8.0 + no contact header in reequest */ + if (contact==NULL) { + ERROR("Contact header is missing!"); + /* THIS IS SEVERE - I HAVE NO WAY TO FIGURE OUT WHO THE + REAL CLIENT IS BEHIND THIS PACKET... + what can I do here? */ + return 1; + } +#endif + type = 0; for (i=0; iurl, urlmap[i].true_url)==0) { type=REQTYP_OUTGOING; @@ -104,6 +118,15 @@ int proxy_request (sip_t *request) { request->from->url->host); break; } +#endif + /* outgoing request ('from' == 'masq') */ + if (compare_url(request->from->url, urlmap[i].masq_url)==0) { + type=REQTYP_INCOMMING; + DEBUGC(DBCLASS_PROXY,"outgoing request from %s@%s from inbound", + request->from->url->username, + request->from->url->host); + break; + } }