[gnome-software/wip/ubuntu-3-20] Handle failure to accept debconf connection
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-3-20] Handle failure to accept debconf connection
- Date: Tue, 9 May 2017 02:24:06 +0000 (UTC)
commit 82929057d70dcb752dde268e797d632002a0c5c9
Author: Robert Ancell <robert ancell canonical com>
Date: Tue May 9 13:44:53 2017 +1200
Handle failure to accept debconf connection
src/plugins/gs-plugin-apt.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.cc b/src/plugins/gs-plugin-apt.cc
index 4d3333c..55087ba 100644
--- a/src/plugins/gs-plugin-apt.cc
+++ b/src/plugins/gs-plugin-apt.cc
@@ -888,6 +888,10 @@ debconf_accept_cb (GSocket *socket, GIOCondition condition, gpointer user_data)
g_autoptr(GError) error = NULL;
data->debconf_connection = g_socket_accept (socket, data->cancellable, &error);
+ if (data->debconf_connection == NULL) {
+ g_warning ("Failed to accept debconf connection: %s", error->message);
+ return G_SOURCE_CONTINUE;
+ }
data->debconf_read_source = g_socket_create_source (data->debconf_connection, G_IO_IN,
data->cancellable);
g_source_set_callback (data->debconf_read_source, (GSourceFunc) debconf_read_cb, data, NULL);
g_source_attach (data->debconf_read_source, data->context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]