aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-11-13 17:42:27 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-11-13 17:42:27 +0900
commit3dd5cdde93001e0add1e49dd05371a6c087128d1 (patch)
tree27ca0e4c02cadc3a7f63702b668c715e7bf25edf
parent45f0b1e8378f88248a096e5c0f1bf18ce52d5561 (diff)
downloadpacrunner-3dd5cdde93001e0add1e49dd05371a6c087128d1.tar.gz
Make pacrunner_proxy_set_method a private helper function
-rw-r--r--src/pacrunner.h2
-rw-r--r--src/proxy.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/src/pacrunner.h b/src/pacrunner.h
index cb5b496..96e3567 100644
--- a/src/pacrunner.h
+++ b/src/pacrunner.h
@@ -61,8 +61,6 @@ void pacrunner_proxy_unref(struct pacrunner_proxy *proxy);
const char *pacrunner_proxy_get_interface(struct pacrunner_proxy *proxy);
const char *pacrunner_proxy_get_script(struct pacrunner_proxy *proxy);
-int pacrunner_proxy_set_method(struct pacrunner_proxy *proxy,
- enum pacrunner_proxy_method method);
int pacrunner_proxy_set_direct(struct pacrunner_proxy *proxy);
int pacrunner_proxy_set_auto(struct pacrunner_proxy *proxy, const char *url);
int pacrunner_proxy_set_script(struct pacrunner_proxy *proxy,
diff --git a/src/proxy.c b/src/proxy.c
index c50f366..c56cf25 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -123,7 +123,7 @@ const char *pacrunner_proxy_get_script(struct pacrunner_proxy *proxy)
return proxy->script;
}
-int pacrunner_proxy_set_method(struct pacrunner_proxy *proxy,
+static int set_method(struct pacrunner_proxy *proxy,
enum pacrunner_proxy_method method)
{
DBG("proxy %p method %d", proxy, method);
@@ -148,7 +148,7 @@ int pacrunner_proxy_set_direct(struct pacrunner_proxy *proxy)
if (proxy == NULL)
return -EINVAL;
- return pacrunner_proxy_set_method(proxy, PACRUNNER_PROXY_METHOD_DIRECT);
+ return set_method(proxy, PACRUNNER_PROXY_METHOD_DIRECT);
}
static void download_callback(char *content, void *user_data)
@@ -180,7 +180,7 @@ int pacrunner_proxy_set_auto(struct pacrunner_proxy *proxy, const char *url)
if (proxy == NULL)
return -EINVAL;
- err = pacrunner_proxy_set_method(proxy, PACRUNNER_PROXY_METHOD_AUTO);
+ err = set_method(proxy, PACRUNNER_PROXY_METHOD_AUTO);
if (err < 0)
return err;
@@ -215,7 +215,7 @@ int pacrunner_proxy_set_script(struct pacrunner_proxy *proxy,
if (script == NULL)
return -EINVAL;
- err = pacrunner_proxy_set_method(proxy, PACRUNNER_PROXY_METHOD_AUTO);
+ err = set_method(proxy, PACRUNNER_PROXY_METHOD_AUTO);
if (err < 0)
return err;
@@ -243,7 +243,7 @@ int pacrunner_proxy_set_server(struct pacrunner_proxy *proxy,
if (server == NULL)
return -EINVAL;
- err = pacrunner_proxy_set_method(proxy, PACRUNNER_PROXY_METHOD_MANUAL);
+ err = set_method(proxy, PACRUNNER_PROXY_METHOD_MANUAL);
if (err < 0)
return err;