On Nov 12, 2009 at 07:42, Juha Heinanen jh@tutpro.com wrote:
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
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().
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;
^^^^^^^^^^ replace with STR_ST. (for the record, I see you switched to append_branch()).
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.
Yes, it's a recent change.
Andrei