Module: kamailio
Branch: master
Commit: c9b885ff791bd71fcbf40824369fc9369dcc6e48
URL:
https://github.com/kamailio/kamailio/commit/c9b885ff791bd71fcbf40824369fc93…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-10-25T14:43:17+02:00
avpops: removed unused function get_source_uri()
---
Modified: src/modules/avpops/avpops_impl.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c9b885ff791bd71fcbf40824369fc93…
Patch:
https://github.com/kamailio/kamailio/commit/c9b885ff791bd71fcbf40824369fc93…
---
diff --git a/src/modules/avpops/avpops_impl.c b/src/modules/avpops/avpops_impl.c
index c760becb43..8a6e4c2b2d 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)