From c9b885ff791bd71fcbf40824369fc9369dcc6e48 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Mon, 25 Oct 2021 14:42:54 +0200 Subject: [PATCH] avpops: removed unused function get_source_uri() --- src/modules/avpops/avpops_impl.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/modules/avpops/avpops_impl.c b/src/modules/avpops/avpops_impl.c index c760becb433..8a6e4c2b2dc 100644 --- a/src/modules/avpops/avpops_impl.c +++ b/src/modules/avpops/avpops_impl.c @@ -214,38 +214,6 @@ static int dbrow2avp(struct db_row *row, struct db_param *dbp, int_str attr, return add_avp( (unsigned short)db_flags, avp_attr, avp_val); } - -inline static str* get_source_uri(struct sip_msg* msg,int source) -{ - /* which uri will be used? */ - if (source&AVPOPS_USE_FROM) - { /* from */ - if (parse_from_header( msg )<0 ) - { - LM_ERR("failed to parse from\n"); - goto error; - } - return &(get_from(msg)->uri); - } else if (source&AVPOPS_USE_TO) - { /* to */ - if (parse_headers( msg, HDR_TO_F, 0)<0) - { - LM_ERR("failed to parse to\n"); - goto error; - } - return &(get_to(msg)->uri); - } else if (source&AVPOPS_USE_RURI) { /* RURI */ - if(msg->new_uri.s!=NULL && msg->new_uri.len>0) - return &(msg->new_uri); - return &(msg->first_line.u.request.uri); - } else { - LM_ERR("unknown source <%d>\n", source); - goto error; - } -error: - return 0; -} - static inline void int_str2db_val( int_str is_val, str *val, int is_s) { if (is_s)