Browse code

core: b/f: update next_hop on reply if not empty

this fixes issues with SRV on following requests when next_hop_1st_req is not set.

Raphael Coeffic authored on 23/10/2013 12:01:55
Showing 1 changed files
... ...
@@ -469,6 +469,10 @@ void AmBasicSipDialog::updateDialogTarget(const AmSipReply& reply)
469 469
        (reply.cseq_method == SIP_METH_SUBSCRIBE)) ) {
470 470
     
471 471
     setRemoteUri(reply.to_uri);
472
+    if(!getNextHop().empty()) {
473
+      setNextHop(reply.remote_ip + ":"
474
+		 + int2str(reply.remote_port));
475
+    }
472 476
 
473 477
     string ua = getHeader(reply.hdrs,"Server");
474 478
     setRemoteUA(ua);