Module: sip-router Branch: carstenbock/ims Commit: 1c1a86d88078fe5fd63be59a6f153e8d6b9b6125 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c1a86d8...
Author: Carsten Bock carsten@bock.info Committer: Carsten Bock carsten@bock.info Date: Thu Jan 13 23:25:53 2011 +0100
- removed unnecessary functions
---
modules/pcscf/mod.c | 8 ---- modules/pcscf/registration.c | 79 ------------------------------------------ modules/pcscf/registration.h | 4 -- 3 files changed, 0 insertions(+), 91 deletions(-)
diff --git a/modules/pcscf/mod.c b/modules/pcscf/mod.c index 3fee583..fe9f3a1 100644 --- a/modules/pcscf/mod.c +++ b/modules/pcscf/mod.c @@ -278,10 +278,6 @@ uint32_t gg_af_port = 0; * <p> * - P_process_notification() - process a NOTIFY for the reg event * <p> - * - P_mobile_terminating() - checks if the request contains the Routes indicating a terminating case, - * as specified in the Path header at registration - * - P_remove_route() - remove a route header - deprecated, loose_route() should do the job - * <p> * - P_NAT_relay() - forward a message through a NAT * - P_SDP_manipulate() - manipulate a SDP to pipe the media through the RTP Proxy (for NAT) * <p> @@ -303,9 +299,6 @@ uint32_t gg_af_port = 0; * <p> * - P_trans_in_processing() - checks if the transaction is already in processing * <p> - * - P_check_via_sent_by() - checks if the sent-by parameter in the first Via header equals the source IP address of the message - * - P_add_via_received() - adds a received parameter to the first via header with the srouce IP address - * <p> * - P_follows_via_list() - checks if a response coming from a UE contains the same Via headers sent in the corresponding request * - P_enforce_via_list() - enforce a response coming from a UE to contain the same Via headers sent in the corresponding request * <p> @@ -354,7 +347,6 @@ static cmd_export_t pcscf_cmds[]={
{"P_process_notification", P_process_notification, 0, 0, REQUEST_ROUTE},
- {"P_mobile_terminating", P_mobile_terminating, 0, 0, REQUEST_ROUTE}, {"P_remove_route", P_remove_route, 1, 0, REQUEST_ROUTE}, {"P_NAT_relay", P_NAT_relay, 0, 0, REQUEST_ROUTE|ONREPLY_ROUTE}, diff --git a/modules/pcscf/registration.c b/modules/pcscf/registration.c index 1b9151c..ae65c18 100644 --- a/modules/pcscf/registration.c +++ b/modules/pcscf/registration.c @@ -728,85 +728,6 @@ error: return ret; }
- -/** - * Determines if this is the Mobile Terminating case. - * uses the indication in the first Route header - * @param msg - the SIP message - * @param str1 - not used - * @param str2 - not used - * @returns #CSCF_RETURN_TRUE if terminating case, #CSCF_RETURN_FALSE if not - */ -int P_mobile_terminating(struct sip_msg *msg,char *str1,char *str2) -{ - int ret=CSCF_RETURN_FALSE; - str route={0,0}; - int i; - - route = cscf_get_first_route(msg,0,0); - if (!route.len){ - LOG(L_DBG,"DBG:"M_NAME":P_mobile_terminating: No Route header.\n"); - goto done; - } - i=0; - while(i<route.len && (route.s[i]==' ' ||route.s[i]=='\t'||route.s[i]=='<')) - i++; - route.s += i; - route.len -= i; - i=0; - while(route.s[i]!=';' && route.s[i]!='>' && i<route.len) - i++; - route.len = i; - - if (route.len == pcscf_path_str.len && - strncasecmp(route.s,pcscf_path_str.s,pcscf_path_str.len)==0) - { - LOG(L_DBG,"DBG:"M_NAME":P_mobile_terminating: Term indication found.\n"); - ret = CSCF_RETURN_TRUE; - goto done; - }else{ - LOG(L_DBG,"DBG:"M_NAME":P_mobile_terminating: Term indication not found in <%.*s> as <%.*s>.\n", - route.len,route.s,pcscf_path_str.len,pcscf_path_str.s); - } - - -done: - return ret; -} - - -/** - * \deprecated - * Removes header pointing to itself. - * @param msg - the SIP message - * @param str1 - if not empty, will look and remove this value instead - * @param str2 - not used - * @returns #CSCF_RETURN_TRUE if ok, #CSCF_RETURN_FALSE if not - */ -int P_remove_route(struct sip_msg *msg,char *str1,char *str2) -{ - int ret=CSCF_RETURN_FALSE; - str x; - - if (str1 && strlen(str1)){ - x.s = str1; - x.len =strlen(str1); - if (cscf_remove_first_route(msg,x)) - ret = CSCF_RETURN_TRUE; - else - ret = CSCF_RETURN_FALSE; - }else{ - if (cscf_remove_first_route(msg,pcscf_path_str)+cscf_remove_first_route(msg,pcscf_name_str)) - ret = CSCF_RETURN_TRUE; - else - ret = CSCF_RETURN_FALSE; - } - - return ret; -} - - - /** * Checks if the message follows Service-Route imposed at registration. * @param msg - the SIP message diff --git a/modules/pcscf/registration.h b/modules/pcscf/registration.h index 55d72d7..cc7e299 100644 --- a/modules/pcscf/registration.h +++ b/modules/pcscf/registration.h @@ -85,10 +85,6 @@ int P_assert_called_identity(struct sip_msg *msg,char *str1,char *str2);
int P_process_notification(struct sip_msg *msg,char *str1,char *str2);
-int P_mobile_terminating(struct sip_msg *msg,char *str1,char *str2); - -int P_remove_route(struct sip_msg *msg,char *str1,char *str2); - int P_NAT_relay(struct sip_msg *msg,char *str1,char *str2);
int P_security_relay(struct sip_msg *msg,char *str1,char *str2);