From 27811b792c4607550d60103165bb19be5fd3c3fd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 19 Aug 2016 09:28:24 +0200 Subject: proxy: don't let nm_pacrunner_manager_send() fail nm_pacrunner_manager_send() would only fail if passed in a NULL proxy_config. And then it would log a message without details about what failed. Just don't do that. --- src/nm-pacrunner-manager.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/nm-pacrunner-manager.c') diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c index b2e4632c29..3d60b6efcb 100644 --- a/src/nm-pacrunner-manager.c +++ b/src/nm-pacrunner-manager.c @@ -323,11 +323,8 @@ pacrunner_proxy_cb (GObject *source, GAsyncResult *res, gpointer user_data) * @proxy_config: Proxy config of the connection * @ip4_conifg: IP4 Cofig of the connection * @ip6_config: IP6 Config of the connection - * - * Returns: %TRUE if configs were sucessfully sent - * to PacRunner, %FALSE on error */ -gboolean +void nm_pacrunner_manager_send (NMPacRunnerManager *self, const char *iface, NMProxyConfig *proxy_config, @@ -340,11 +337,10 @@ nm_pacrunner_manager_send (NMPacRunnerManager *self, GVariantBuilder proxy_data; GVariant *pacrunner_manager_args; - g_return_val_if_fail (NM_IS_PACRUNNER_MANAGER (self), FALSE); - priv = NM_PACRUNNER_MANAGER_GET_PRIVATE (self); + g_return_if_fail (NM_IS_PACRUNNER_MANAGER (self)); + g_return_if_fail (proxy_config); - if (!proxy_config) - return FALSE; + priv = NM_PACRUNNER_MANAGER_GET_PRIVATE (self); g_free (priv->iface); priv->iface = g_strdup (iface); @@ -403,8 +399,6 @@ nm_pacrunner_manager_send (NMPacRunnerManager *self, * sent when PacRunner appears. */ send_pacrunner_proxy_data (self, pacrunner_manager_args); - - return TRUE; } static void -- cgit v1.2.1