just when i mentioned in previous email that i don't currently have any known problems with sr_3.0, a new one hit me.
script calls next_gw(), which results in errors:
Nov 12 07:35:24 localhost /usr/sbin/sip-proxy[5495]: INFO: lcr [lcr_mod.c:2062]: appending branch sip:110415036078@192.98.101.1:5060 Nov 12 07:35:24 localhost /usr/sbin/sip-proxy[5495]: : <core> [action.c:344]: BUG: do_action: bad append_branch_t 1 Nov 12 07:35:24 localhost /usr/sbin/sip-proxy[5495]: ERROR: <core> [action.c:1251]: run action error at: :0 Nov 12 07:35:24 localhost /usr/sbin/sip-proxy[5495]: ERROR: lcr [lcr_mod.c:2065]: do_action failed with return value <-5>
the piece of code where the errors comes is this:
uri_str.s = r_uri; uri_str.len = r_uri_len; memset(&act, '\0', sizeof(act)); act.type = APPEND_BRANCH_T; act.val[0].type = STRING_ST; act.val[0].u.str = uri_str; act.val[1].type = NUMBER_ST; act.val[1].u.number = 0; init_run_actions_ctx(&ra_ctx); LM_INFO("appending branch <%.*s>\n", uri_str.len, uri_str.s); rval = do_action(&ra_ctx, &act, _m); if (rval != 1) { LM_ERR("do_action failed with return value <%d>\n", rval); return -1; } }
i added the LM_INFO in order to verify validity of the uri and it looks ok to me.
is this some new bug or what? i haven't seen it earlier although i have been running the same tests.
-- juha
On Nov 12, 2009 at 07:42, Juha Heinanen jh@tutpro.com wrote:
The parameter for the script append branch is now a str and not a null-terminated string. I've changed that recently (394e061f) when I've made the script append_branch more compatible with the k version (force socket a.s.o.).
I haven't thought that someone might use do_action() w/ APPEND_BRANCH_T instead of directly using append_branch().
^^^^^^^^^^ replace with STR_ST. (for the record, I see you switched to append_branch()).
Yes, it's a recent change.
Andrei
Andrei Pelinescu-Onciul writes:
I haven't thought that someone might use do_action() w/ APPEND_BRANCH_T instead of directly using append_branch().
andrei,
as i mentioned, i converted the do action thing to append_branch. i still have in lcr module this:
memset(&act, '\0', sizeof(act)); act.type = SET_URI_T; act.val[0].type = STRING_ST; act.val[0].u.string = r_uri; init_run_actions_ctx(&ra_ctx); rval = do_action(&ra_ctx, &act, _m);
is there a similar high-level replacement for SET_URI_T do_action?
-- juha
On Nov 12, 2009 at 11:44, Juha Heinanen jh@tutpro.com wrote:
Yes, it's rewrite_uri(msg, str uri), but you don't need to change, SET_URI_T hasn't been modified.
Andrei
Andrei Pelinescu-Onciul writes:
The parameter for the script append branch is now a str and not a null-terminated string.
how about the other do_actions that exist in various modules (SET_URI_T and SET_USET_T atleast), should they too take act.val[0].type STR_ST, or are they still using STRING_ST?
-- juha
On Nov 12, 2009 at 11:53, Juha Heinanen jh@tutpro.com wrote:
No, they haven't changed. The only one that did was APPEND_BRANCH_T.
I did a quick grep after do_action in all the modules and all invocations seem ok now.
Andrei