On Wednesday 26 September 2007, Carsten Bock wrote: > Hi, > > after understanding, how the carrier-route-module works (thanks > Henning), i have a question regarding the source. > I looked at the method tree_route_uri: > > int tree_route_uri(struct sip_msg * msg, char * _tree, char * _level) { > struct rewrite_data * rd = NULL; > int index; > str ruser; > str ruri; > if (parse_sip_msg_uri(msg) < 0) { > return -1; > } > ruser.s = msg->parsed_uri.user.s; > ruser.len = msg->parsed_uri.user.len; > ruri.s = msg->parsed_uri.user.s; > ruri.len = msg->parsed_uri.user.len; > do { > rd = get_data(); > } while (rd == NULL); > index = rd->default_carrier_index; > release_data(rd); > return carrier_rewrite_msg(index, (int)_level, &ruri, msg, &ruser, > shs_call_id, alg_crc32); > } > [..]
Hello Carsten, yes, you're right. I missed this one in my tests. I'll commit a fix later, and thank you for your patch. > Is it ok, that release_data(rd) is not called at every return statement? > (e.g. here: LM_ERR("desired routing tree with id %i doesn't exist\n", > (int)_tree);). You're here right, too. Fixed in revision 2829. > If i understood the source right, i will add a patch for this until end > of the week and add pseudo-variables-support to the > "cr_tree_rewrite_uri"-Method. Perhaps you can use the "new" method of evaluating of pseudo-variables, the pv_parse and pv_print functions, like in textops:append_to_reply_f and :it_list_fixup. Cheers, Henning _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel