In modules/carrierroute/cr_db.c:

> @@ -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 commentCOMMENT_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.