[sr-dev] [kamailio] Added modparam id_in_avp for carrierroute (#221)

Lucian Balaceanu notifications at github.com
Wed Jul 1 19:13:49 CEST 2015


> @@ -349,7 +349,29 @@ int load_route_data_db(struct route_data_t * rd) {
>  			tmp_rewrite_host.s=(char *)row->values[COL_REWRITE_HOST].val.string_val;
>  			tmp_rewrite_prefix.s=(char *)row->values[COL_REWRITE_PREFIX].val.string_val;
>  			tmp_rewrite_suffix.s=(char *)row->values[COL_REWRITE_SUFFIX].val.string_val;
> -			tmp_comment.s=(char *)row->values[COL_COMMENT].val.string_val;
> +			switch(cr_id_in_avp) {
> +				case 0:
> +					//Description only
> +					tmp_comment.s=(char *)row->values[COL_COMMENT].val.string_val;
> +					break;
> +				case 1:
> +					//ID of row + comment

I would declare a static char comment[COMMENT_LEN] ( similar to query[QUERY_LEN] ) instead of managing the allocation/deallocation on my own as add_route function seems to duplicate the iformation in the comment parameter.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/221/files#r33700814
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150701/98f027e1/attachment-0001.html>


More information about the sr-dev mailing list