<p>In <a href="https://github.com/kamailio/kamailio/pull/221#discussion_r33700814">modules/carrierroute/cr_db.c</a>:</p>
<pre style='color:#555'>> @@ -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
</pre>
<p>I would declare a static char comment<a href="similar%20to%20query%5BQUERY_LEN%5D">COMMENT_LEN</a> instead of managing the allocation/deallocation on my own as add_route function seems to duplicate the iformation in the comment parameter.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/221/files#r33700814">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36Zb8U26FCJG_OOGs4GtP6hcSuEDSsks5oZBdNgaJpZM4FLGmL.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/221/files#r33700814"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>