I see that doesn't work well, because message are sent always with UDP
and tport is ignored.
Problem is on outgoing_create function on nta.c file.
Seems that tport it is used only if there are route header but this is
wrong, use tport (for outbound message complaint with outbound draft) on
message with route is correct.

I appended patch for nta.c file.
Can anyone said me if you can add this patch to source? Thanks

Ge@@ru

On Tue, 2007-11-20 at 08:46 +0100, Ge@@ru wrote:
> Hi, 
> As i said on irc i see that mtu value on tport_tsend function isn't set
> a default value if there isn't a TPTAG_MTU flag. 
> I use a tcp tport, but why doesn't set mtu value to a default value of
> 65535 (for example) for TCP and 1300 for UDP if mtu is equal to 0?
> 
> What i do for handle this problem:
> - i save tport object (TCP) from register message,
> - i use saved tport object for send INVITE.
> 
> So, if i don't set TPTAG_MTU i have Message too long error.
> This error isn't handled with same message if i don't use saved tport
> object.
> 
> Still thanks to pessi for your help.
> 
> Good work.
> 
> Bye
> 
> Ge@@ru
--- nta.c	2007-11-20 15:15:52.000000000 +0100
+++ nta.c.new	2007-11-20 15:18:18.000000000 +0100
@@ -6978,6 +6978,10 @@
 
   if (route_url) {
     invalid = nta_tpn_by_url(home, orq->orq_tpn, &scheme, &port, route_url);
+    if (override_tport) {
+      scheme = "sip";		/* XXX */
+      invalid = tport_name_dup(home, orq->orq_tpn, tpn);
+    }
     resolved = tport_name_is_resolved(orq->orq_tpn);
     orq->orq_url = url_hdup(home, sip->sip_request->rq_url);
     if (route_url != (url_string_t *)agent->sa_default_proxy)
@@ -7000,7 +7004,8 @@
     sip_fragment_clear(sip->sip_request->rq_common);
   }
 
-  orq->orq_tpn->tpn_ident = tp_ident;
+  if (!override_tport)
+    orq->orq_tpn->tpn_ident = tp_ident;
   if (comp == NULL)
     orq->orq_tpn->tpn_comp = comp;
 
@@ -7064,8 +7069,9 @@
   }
 
 #if HAVE_SOFIA_SRESOLV
-  if (!resolved)
-    orq->orq_tpn->tpn_port = port;
+  if (!override_tport)
+    if (!resolved)
+      orq->orq_tpn->tpn_port = port;
   orq->orq_resolved = resolved;
 #else
   orq->orq_resolved = resolved = 1;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to