baresip/baresip-2.9.0-gtk-dial-segfault.patch

62 lines
1.7 KiB
Diff
Raw Normal View History

From 7ee4a769aaa1e3899b536b724cc854dd327ae865 Mon Sep 17 00:00:00 2001
From: mbattista <m0battista@gmail.com>
Date: Mon, 7 Nov 2022 20:20:45 +0100
Subject: [PATCH] gtk: fixes issue #2315 and GTK errors on quit (#2316)
---
modules/gtk/gtk_mod.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/gtk/gtk_mod.c b/modules/gtk/gtk_mod.c
index f3cf82603..c359a40f1 100644
--- a/modules/gtk/gtk_mod.c
+++ b/modules/gtk/gtk_mod.c
@@ -131,9 +131,6 @@ static void menu_on_quit(GtkMenuItem *menuItem, gpointer arg)
struct gtk_mod *mod = arg;
(void)menuItem;
- gtk_widget_destroy(GTK_WIDGET(mod->app_menu));
- g_object_unref(G_OBJECT(mod->status_icon));
-
mqueue_push(mod->mq, MQ_QUIT, 0);
info("quit from gtk\n");
}
@@ -772,12 +769,15 @@ static gboolean status_icon_on_button_press(GtkStatusIcon *status_icon,
int gtk_mod_connect(struct gtk_mod *mod, const char *uri)
{
char *uric = NULL;
+ struct pl url_pl;
int err = 0;
+ pl_set_str(&url_pl, uri);
if (!mod)
return ENOMEM;
- err = account_uri_complete_strdup(ua_account(mod->ua_cur), &uric, uri);
+ err = account_uri_complete_strdup(ua_account(mod->ua_cur),
+ &uric, &url_pl);
if (err)
goto out;
@@ -793,8 +793,10 @@ int gtk_mod_connect_attended(struct gtk_mod *mod, const char *uri,
{
struct attended_transfer_store *ats;
char *uric = NULL;
+ struct pl url_pl;
int err = 0;
+ pl_set_str(&url_pl, uri);
if (!mod)
return ENOMEM;
@@ -802,7 +804,8 @@ int gtk_mod_connect_attended(struct gtk_mod *mod, const char *uri,
if (!ats)
return ENOMEM;
- err = account_uri_complete_strdup(ua_account(mod->ua_cur), &uric, uri);
+ err = account_uri_complete_strdup(ua_account(mod->ua_cur),
+ &uric, &url_pl);
if (err)
goto out;