]> sjero.net Git - linphone/commitdiff
do not make a double registration when using tcp (useless)
authorSimon Morlat <simon.morlat@linphone.org>
Fri, 4 Jun 2010 09:44:11 +0000 (11:44 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Fri, 4 Jun 2010 09:44:11 +0000 (11:44 +0200)
improve account configuration box

coreapi/sal_eXosip2.c
gtk-glade/sip_account.glade

index 463f0bcdb2c5cc8d20e2376badbcff28dd11b03a..bc097f94a6bd0efce794c140362ec072dc14d639 100644 (file)
@@ -378,6 +378,12 @@ static int extract_received_rport(osip_message_t *msg, const char **received, in
        *received=NULL;
        osip_message_get_via(msg,0,&via);
        if (!via) return -1;
+
+       /* it is useless to do that with tcp since client socket might have a different port
+               than the server socket.
+       */
+       if (strcasecmp(via->protocol,"tcp")==0) return -1;
+       
        if (via->port && via->port[0]!='\0')
                *rportval=atoi(via->port);
        
index 2828e30369d1e2055f7ede2746cd2a1bc1b07fbc..bb88626198b3a37bb441be01012dd9738f9a4a99 100644 (file)
@@ -1,19 +1,20 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sat Nov  8 15:49:12 2008 -->
+<?xml version="1.0"?>
 <glade-interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkDialog" id="sip_account">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Linphone - Configure a SIP account</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="window_position">center-on-parent</property>
     <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
           <widget class="GtkFrame" id="frame15">
@@ -29,6 +30,7 @@
                   <widget class="GtkVBox" id="vbox11">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
                     <child>
                       <widget class="GtkTable" id="table6">
                         <property name="visible">True</property>
@@ -40,7 +42,7 @@
                             <property name="visible">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="label" translatable="yes">Your SIP identity:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                            <property name="justify">right</property>
                           </widget>
                         </child>
                         <child>
@@ -49,6 +51,8 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="tooltip" translatable="yes">Looks like sip:&lt;username&gt;@&lt;domain&gt;</property>
+                            <property name="text" translatable="yes">sip:</property>
                           </widget>
                           <packing>
                             <property name="left_attach">1</property>
@@ -60,7 +64,7 @@
                             <property name="visible">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="label" translatable="yes">SIP Proxy address:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                            <property name="justify">right</property>
                           </widget>
                           <packing>
                             <property name="top_attach">1</property>
@@ -72,6 +76,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="tooltip" translatable="yes">Looks like sip:&lt;proxy hostname&gt;</property>
                             <property name="text" translatable="yes">sip:</property>
                           </widget>
                           <packing>
@@ -86,7 +91,7 @@
                             <property name="visible">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="label" translatable="yes">Route (optional):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                            <property name="justify">right</property>
                           </widget>
                           <packing>
                             <property name="top_attach">2</property>
                             <property name="visible">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="label" translatable="yes">Registration duration (sec):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                            <property name="justify">right</property>
                           </widget>
                           <packing>
                             <property name="top_attach">3</property>
                           </packing>
                         </child>
                       </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkCheckButton" id="register">
+                        <property name="label" translatable="yes">Register at startup</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Register at startup</property>
-                        <property name="response_id">0</property>
+                        <property name="receives_default">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkCheckButton" id="publish">
+                        <property name="label" translatable="yes">Publish presence information</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Publish presence information</property>
-                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
           <widget class="GtkHButtonBox" id="dialog-action_area2">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
               <widget class="GtkButton" id="button6">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">gtk-ok</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">0</property>
                 <signal name="clicked" handler="linphone_gtk_proxy_ok"/>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
             <child>
               <widget class="GtkButton" id="button7">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">gtk-cancel</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">0</property>
                 <signal name="clicked" handler="linphone_gtk_proxy_cancel"/>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </widget>