diff options
author | Thomas Haller <thaller@redhat.com> | 2016-08-19 09:28:24 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-04 11:44:44 +0200 |
commit | 27811b792c4607550d60103165bb19be5fd3c3fd (patch) | |
tree | 39bf4ae15265a52b56139eb05313247868f08544 /src/nm-pacrunner-manager.c | |
parent | 3ef7d316f6a9618855380481971770f89f19e034 (diff) | |
download | NetworkManager-27811b792c4607550d60103165bb19be5fd3c3fd.tar.gz |
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 <info> message without details about what failed.
Just don't do that.
Diffstat (limited to 'src/nm-pacrunner-manager.c')
-rw-r--r-- | src/nm-pacrunner-manager.c | 14 |
1 files changed, 4 insertions, 10 deletions
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 |