- bug fixed in request() - after linking the RURI in the new dialog,
authorBogdan-Andrei Iancu <bogdan@voice-system.ro>
Thu, 1 Apr 2004 17:06:07 +0000 (17:06 +0000)
committerBogdan-Andrei Iancu <bogdan@voice-system.ro>
Thu, 1 Apr 2004 17:06:07 +0000 (17:06 +0000)
  calculate_hooks must be called to update next_hop

modules/tm/uac.c

index 765d921..5c795f4 100644 (file)
@@ -182,6 +182,8 @@ int t_uac(str* method, str* headers, str* body, dlg_t* dialog,
        if(!dialog->hooks.next_hop && w_calculate_hooks(dialog)<0)
                goto error2;
 
        if(!dialog->hooks.next_hop && w_calculate_hooks(dialog)<0)
                goto error2;
 
+       DBG("DEBUG:tm:t_uac: next_hop=<%.*s>\n",dialog->hooks.next_hop->len,
+                       dialog->hooks.next_hop->s);
        send_sock = uri2sock(dialog->hooks.next_hop, &to_su, PROTO_NONE);
        if (!send_sock) {
                ret=ser_error;
        send_sock = uri2sock(dialog->hooks.next_hop, &to_su, PROTO_NONE);
        if (!send_sock) {
                ret=ser_error;
@@ -329,6 +331,7 @@ int request(str* m, str* ruri, str* to, str* from, str* h, str* b, transaction_c
                dialog->rem_target.len = ruri->len;
                dialog->hooks.request_uri = &dialog->rem_target;
        }
                dialog->rem_target.len = ruri->len;
                dialog->hooks.request_uri = &dialog->rem_target;
        }
+       w_calculate_hooks(dialog);
 
        res = t_uac(m, h, b, dialog, c, cp);
        dialog->rem_target.s = 0;
 
        res = t_uac(m, h, b, dialog, c, cp);
        dialog->rem_target.s = 0;