> @@ -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
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev