- minor cleanup

- removed some old linphone-bug-workaround hack
This commit is contained in:
Thomas Ries
2004-02-06 00:40:45 +00:00
parent af152d2bf4
commit ed67096584
4 changed files with 4 additions and 46 deletions
+1 -33
View File
@@ -190,7 +190,7 @@ int proxy_request (osip_message_t *request, struct sockaddr_in *from) {
}
/*
* is the telegram directed to an internal registered host?
* is the telegram directed to an internally registered host?
* -> it must be an INCOMING request
*/
if (type == 0) for (i=0; i<URLMAP_SIZE; i++) {
@@ -206,38 +206,6 @@ int proxy_request (osip_message_t *request, struct sockaddr_in *from) {
#endif
/*
* ok, we got a request that we are allowed to process.
*/
#ifdef HACK1
/* linphone-0.9.0pre4
take To address and place it into URI (at least the host part)
Linphone-0.9.0pre4 puts the proxy host in the request URI
if OUTBOUND proxy is activated!
This is only a hack to recreate the proper final request URI.
This issue has been fixed in 0.9.1pre1
*/
{
osip_header_t *header_ua;
osip_uri_t *url2;
url2=osip_message_get_uri(request);
osip_message_get_user_agent(request,0,&header_ua);
if ( header_ua && header_ua->hvalue &&
(strcmp(header_ua->hvalue,"oSIP/Linphone-0.8.0")==0) ) {
/* if an outgoing request, try to fix the SIP URI */
if (type == REQTYP_OUTGOING) {
WARN("broken linphone-0.8.0: restoring SIP URI");
free (url2->host);
url2->host=malloc(strlen(request->to->url->host));
strcpy(url2->host,request->to->url->host);
}
}
}
#endif
/*
* logging of passing calls
*/
+2 -2
View File
@@ -185,7 +185,6 @@ static void *rtpproxy_main(void *arg) {
if (count > 0) {
if (rtp_proxytable[i].rtp_tx_sock == 0) {
int j;
osip_call_id_t callid;
int direction = rtp_proxytable[i].direction;
int media_stream_no = rtp_proxytable[i].media_stream_no;
@@ -194,7 +193,6 @@ static void *rtpproxy_main(void *arg) {
for (j=0;(j<RTPPROXY_SIZE);j++) {
osip_call_id_t cid;
cid.number = rtp_proxytable[j].callid_number;
cid.host = rtp_proxytable[j].callid_host;
@@ -223,6 +221,8 @@ static void *rtpproxy_main(void *arg) {
WARN("stopping opposite stream");
/* don't lock the mutex, as we own the lock */
callid.number=rtp_proxytable[i].callid_number;
callid.host=rtp_proxytable[i].callid_host;
rtp_relay_stop_fwd(&callid,
rtp_proxytable[i].direction, 1);
}
+1 -1
View File
@@ -50,7 +50,7 @@ int sip_socket=0;
/* -h help option text */
static const char str_helpmsg[] =
PACKAGE"-"VERSION"-"BUILDSTR" (c) 2002-2003 Thomas Ries\n" \
PACKAGE"-"VERSION"-"BUILDSTR" (c) 2002-2004 Thomas Ries\n" \
"\nUsage: siproxd [options]\n\n" \
"options:\n" \
" --help (-h) help\n" \
-10
View File
@@ -197,13 +197,3 @@ struct siproxd_config {
#define DIR_INCOMING 1
#define DIR_OUTGOING 2
/*
* optional hacks
*/
#define HACK1 /* linphone-0.9.0pre4: broken RQ URI hack */
/* 14-Aug-2002 TR
Linphone puts in the proxies hostname in the request URI when
OUTBOUND proxy is activated. But ONLY the hostname. Username and
Port (!!!) are kept from the SIP address given by the user.
This issue is fixed in linphone-0.9.1pre1
*/