mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 00:59:20 +00:00
Merge branch 'master' into dev_sal
Conflicts: console/commands.c
This commit is contained in:
commit
4e721e8a4f
5 changed files with 54 additions and 28 deletions
|
|
@ -1384,6 +1384,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){
|
|||
info=linphone_auth_info_new(linphone_address_get_username(from),NULL,passwd,NULL,NULL);
|
||||
linphone_core_add_auth_info(lc,info);
|
||||
linphone_address_destroy(from);
|
||||
linphone_auth_info_destroy(info);
|
||||
}
|
||||
}
|
||||
elem=linphone_core_get_proxy_config_list(lc);
|
||||
|
|
|
|||
|
|
@ -827,6 +827,8 @@ linphonec_prompt_for_auth_final(LinphoneCore *lc)
|
|||
*/
|
||||
linphone_auth_info_set_passwd(pending_auth, input);
|
||||
linphone_core_add_auth_info(lc, pending_auth);
|
||||
linphone_auth_info_destroy(pending_auth);
|
||||
auth_stack.elem[auth_stack.nitems-1]=0;
|
||||
--(auth_stack.nitems);
|
||||
#ifdef HAVE_READLINE
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -235,6 +235,10 @@ void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
|
|||
void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
|
||||
SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg);
|
||||
SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg);
|
||||
/**
|
||||
* normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222
|
||||
*/
|
||||
int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!--Generated with glade3 3.4.5 on Thu Jul 31 12:01:20 2008 -->
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.16 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<widget class="GtkDialog" id="log">
|
||||
<property name="width_request">540</property>
|
||||
<property name="height_request">290</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Linphone debug window</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="deletable">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="response" handler="gtk_widget_hide"/>
|
||||
|
|
@ -21,17 +21,17 @@
|
|||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="window_placement">GTK_CORNER_BOTTOM_LEFT</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<property name="window_placement">bottom-left</property>
|
||||
<property name="window_placement_set">True</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="textview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
||||
<property name="wrap_mode">word</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
@ -42,27 +42,30 @@
|
|||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button1">
|
||||
<property name="label" translatable="yes">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="label" translatable="yes">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="linphone_gtk_log_hide"/>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -72,14 +72,14 @@ static FILE *linphone_gtk_log_init()
|
|||
static gboolean _log_init = FALSE;
|
||||
const char *dst_fname;
|
||||
|
||||
dst_fname = linphone_gtk_get_ui_config("logfile",NULL);
|
||||
/* For anything to happen, we need a logfile configuration variable,
|
||||
this is our trigger */
|
||||
if (dst_fname) {
|
||||
/* If we haven't initialised yet, arrange for _logdir to contain a
|
||||
directory that has been created and _logfname to contain the
|
||||
path to a file to which we will log */
|
||||
if (!_log_init) {
|
||||
if (!_log_init) {
|
||||
dst_fname = linphone_gtk_get_ui_config("logfile",NULL);
|
||||
/* For anything to happen, we need a logfile configuration variable,
|
||||
this is our trigger */
|
||||
if (dst_fname) {
|
||||
/* arrange for _logdir to contain a
|
||||
directory that has been created and _logfname to contain the
|
||||
path to a file to which we will log */
|
||||
#ifdef WIN32
|
||||
const char *appdata=getenv("LOCALAPPDATA");
|
||||
if (appdata) {
|
||||
|
|
@ -103,7 +103,7 @@ static FILE *linphone_gtk_log_init()
|
|||
open the file so that we will be appending to it. */
|
||||
if (_logdir[0] != '\0') {
|
||||
snprintf(_logfname, sizeof(_logfname), "%s%c%s",
|
||||
_logdir, PATH_SEPARATOR, dst_fname);
|
||||
_logdir, PATH_SEPARATOR, dst_fname);
|
||||
/* If the constant LOGFILE_ROTATION is greater than zero, then
|
||||
we kick away a simple rotation that will ensure that there
|
||||
are never more than LOGFILE_ROTATION+1 old copies of the
|
||||
|
|
@ -122,9 +122,9 @@ static FILE *linphone_gtk_log_init()
|
|||
have to loop in reverse here. */
|
||||
for (i=LOGFILE_ROTATION-1;i>=0;i--) {
|
||||
snprintf(old_fname, sizeof(old_fname), "%s%c%s.%d",
|
||||
_logdir, PATH_SEPARATOR, dst_fname, i);
|
||||
_logdir, PATH_SEPARATOR, dst_fname, i);
|
||||
snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
|
||||
_logdir, PATH_SEPARATOR, dst_fname, i+1);
|
||||
_logdir, PATH_SEPARATOR, dst_fname, i+1);
|
||||
if (ortp_file_exist(old_fname)==0) {
|
||||
if (ortp_file_exist(new_fname)==0)
|
||||
unlink(new_fname);
|
||||
|
|
@ -135,7 +135,7 @@ static FILE *linphone_gtk_log_init()
|
|||
sure to remove the old .0 also, since otherwise rename()
|
||||
would not work as expected. */
|
||||
snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
|
||||
_logdir, PATH_SEPARATOR, dst_fname, 0);
|
||||
_logdir, PATH_SEPARATOR, dst_fname, 0);
|
||||
if (ortp_file_exist(new_fname)==0)
|
||||
unlink(new_fname);
|
||||
rename(_logfname, new_fname);
|
||||
|
|
@ -143,11 +143,10 @@ static FILE *linphone_gtk_log_init()
|
|||
/* Start a new log file and mark that we have now initialised */
|
||||
_logfile = fopen(_logfname, "w");
|
||||
fprintf(_logfile, "%s\n", LOGFILE_MARKER_START);
|
||||
_log_init = TRUE;
|
||||
}
|
||||
}
|
||||
_log_init = TRUE;
|
||||
}
|
||||
|
||||
return _logfile;
|
||||
}
|
||||
|
||||
|
|
@ -214,12 +213,29 @@ static void linphone_gtk_log_file(OrtpLogLevel lev, const char *msg)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static gboolean delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
|
||||
{
|
||||
gtk_widget_hide (widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void linphone_gtk_log_hide(){
|
||||
if (log_window)
|
||||
gtk_widget_hide(log_window);
|
||||
}
|
||||
|
||||
void linphone_gtk_create_log_window(void){
|
||||
GtkTextBuffer *b;
|
||||
log_window=linphone_gtk_create_window("log");
|
||||
b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")));
|
||||
gtk_text_buffer_create_tag(b,"red","foreground","red",NULL);
|
||||
gtk_text_buffer_create_tag(b,"orange","foreground","orange",NULL);
|
||||
/*prevent the log window from being destroyed*/
|
||||
g_signal_connect (G_OBJECT (log_window), "delete-event",
|
||||
G_CALLBACK (delete_event_cb), NULL);
|
||||
|
||||
}
|
||||
|
||||
void linphone_gtk_destroy_log_window(void){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue