mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 11:38:08 +00:00
Setting TLS as default if using sip.linphone.org
This commit is contained in:
parent
dd37611f4e
commit
aeeb9bfb27
4 changed files with 19 additions and 20 deletions
|
|
@ -44,8 +44,8 @@ void linphone_gtk_call_log_update(GtkWidget *w){
|
|||
gtk_tree_view_set_model(v,GTK_TREE_MODEL(store));
|
||||
g_object_unref(G_OBJECT(store));
|
||||
fill_renderers(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"logs_view")));
|
||||
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"call_back_button")),
|
||||
create_pixmap (linphone_gtk_get_ui_config("callback_button","status-green.png")));
|
||||
// gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"call_back_button")),
|
||||
// create_pixmap (linphone_gtk_get_ui_config("callback_button","status-green.png")));
|
||||
}
|
||||
gtk_list_store_clear (store);
|
||||
|
||||
|
|
@ -143,8 +143,8 @@ GtkWidget * linphone_gtk_show_call_logs(void){
|
|||
GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
|
||||
if (w==NULL){
|
||||
w=linphone_gtk_create_window("call_logs");
|
||||
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"call_back_button")),
|
||||
create_pixmap (linphone_gtk_get_ui_config("callback_button","status-green.png")));
|
||||
// gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"call_back_button")),
|
||||
// create_pixmap (linphone_gtk_get_ui_config("callback_button","status-green.png")));
|
||||
g_object_set_data(G_OBJECT(mw),"call_logs",w);
|
||||
g_signal_connect(G_OBJECT(w),"response",(GCallback)linphone_gtk_call_log_response,NULL);
|
||||
gtk_widget_show(w);
|
||||
|
|
|
|||
14
gtk/main.ui
14
gtk/main.ui
|
|
@ -960,19 +960,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="call_back_button">
|
||||
<property name="label" translatable="yes">Call back</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<signal name="clicked" handler="linphone_gtk_call_log_callback" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ void linphone_gtk_update_my_port(GtkWidget *w){
|
|||
}
|
||||
else if (strcmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(linphone_gtk_get_widget(pb, "proto_combo"))), "SIP (UDP)") == 0) {
|
||||
tr.udp_port = (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w));
|
||||
tr.tcp_port = 0;
|
||||
tr.tcp_port = 0;
|
||||
tr.tls_port = 0;
|
||||
}
|
||||
else if (strcmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(linphone_gtk_get_widget(pb, "proto_combo"))), "SIP (TLS)") == 0){
|
||||
tr.udp_port = 0;
|
||||
tr.tcp_port = 0;
|
||||
tr.tcp_port = 0;
|
||||
tr.tls_port = (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -404,7 +404,6 @@ static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page
|
|||
gchar domain[128];
|
||||
g_snprintf(domain, sizeof(domain), "\"%s\"", creator->domain + 4);
|
||||
LinphoneAuthInfo *info=linphone_auth_info_new(username, username, creator->password, NULL, domain);
|
||||
g_free(username);
|
||||
linphone_core_add_auth_info(linphone_gtk_get_core(),info);
|
||||
|
||||
if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1)
|
||||
|
|
@ -412,6 +411,18 @@ static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page
|
|||
|
||||
linphone_core_set_default_proxy(linphone_gtk_get_core(),cfg);
|
||||
linphone_gtk_load_identities();
|
||||
|
||||
// If account created on sip.linphone.org, we configure linphone to use TLS by default
|
||||
g_warning("Domain : %s", creator->domain);
|
||||
if (strcmp(creator->domain, "sip:sip.linphone.org") == 0) {
|
||||
LCSipTransports tr;
|
||||
LinphoneCore* lc = linphone_gtk_get_core();
|
||||
linphone_core_get_sip_transports(lc,&tr);
|
||||
tr.tls_port = tr.udp_port + tr.tcp_port + tr.tls_port;
|
||||
tr.udp_port = 0;
|
||||
tr.tcp_port = 0;
|
||||
linphone_core_set_sip_transports(lc,&tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue