Lyle Thaut writes:
I'm having problems when calling next_gw from a failure_route. It appears that extra characters are getting appended after the transport=udp portion of the INVITE.
i found why next_gw() in failure route does not work in 1.2. in version 1.1 action.c APPEND_BRANCH_T was implemented like this:
case APPEND_BRANCH_T: 292 if ((a->p1_type!=STRING_ST)) { 293 LOG(L_CRIT, "BUG: do_action: bad append_branch_t %d\n", 294 a->p1_type ); 295 ret=E_BUG; 296 break; 297 } 298 s.s = a->p1.string; 299 s.len = s.s?strlen(s.s):0; 300 ret = append_branch( msg, &s, &msg->dst_uri, 0, a->p2.number, 0, 301 msg->force_send_socket); 302 break;
whereas in 1.2 it has been changed to this:
case APPEND_BRANCH_T: 481 /* WARNING: even if type is STRING_ST, it expects a str !!!*/ 482 if ((a->elem[0].type!=STRING_ST)) { 483 LOG(L_CRIT, "BUG: do_action: bad append_branch_t %d\n", 484 a->elem[0].type ); 485 ret=E_BUG; 486 break; 487 } 488 if (a->elem[0].u.s.s==NULL) { 489 ret = append_branch(msg, 0, &msg->dst_uri, 0, 490 a->elem[1].u.number, getb0flags(), msg->force_send_socket); 491 /* reset all branch info */ 492 msg->force_send_socket = 0; 493 setb0flags(0); 494 if(msg->dst_uri.s!=0) 495 pkg_free(msg->dst_uri.s); 496 msg->dst_uri.s = 0; 497 msg->dst_uri.len = 0; 498 } else { 499 ret = append_branch(msg, &a->elem[0].u.s, &msg->dst_uri, 0, 500 a->elem[1].u.number, getb0flags(), msg->force_send_socket); 501 } 502 break;
i must have missed a warning about the change devel mailing list (if there was one) and therefore didn't know to react.
i'll submit a patch to lcr module soon.
-- juha