Browse code

avpops: removed unused function get_source_uri()

Daniel-Constantin Mierla authored on 25/10/2021 12:42:54
Showing 1 changed files
... ...
@@ -214,38 +214,6 @@ static int dbrow2avp(struct db_row *row, struct db_param *dbp, int_str attr,
214 214
 	return add_avp( (unsigned short)db_flags, avp_attr, avp_val);
215 215
 }
216 216
 
217
-
218
-inline static str* get_source_uri(struct sip_msg* msg,int source)
219
-{
220
-	/* which uri will be used? */
221
-	if (source&AVPOPS_USE_FROM)
222
-	{ /* from */
223
-		if (parse_from_header( msg )<0 )
224
-		{
225
-			LM_ERR("failed to parse from\n");
226
-			goto error;
227
-		}
228
-		return &(get_from(msg)->uri);
229
-	} else if (source&AVPOPS_USE_TO)
230
-	{  /* to */
231
-		if (parse_headers( msg, HDR_TO_F, 0)<0)
232
-		{
233
-			LM_ERR("failed to parse to\n");
234
-			goto error;
235
-		}
236
-		return &(get_to(msg)->uri);
237
-	} else if (source&AVPOPS_USE_RURI) {  /* RURI */
238
-		if(msg->new_uri.s!=NULL && msg->new_uri.len>0)
239
-			return &(msg->new_uri);
240
-		return &(msg->first_line.u.request.uri);
241
-	} else {
242
-		LM_ERR("unknown source <%d>\n", source);
243
-		goto error;
244
-	}
245
-error:
246
-	return 0;
247
-}
248
-
249 217
 static inline void int_str2db_val( int_str is_val, str *val, int is_s)
250 218
 {
251 219
 	if (is_s)