summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-01-01 22:38:07 -0800
committerMarcel Holtmann <marcel@holtmann.org>2011-01-01 22:38:07 -0800
commit08c4340d59408e72604d72d961714ca8c5230640 (patch)
tree3046fd01329e93d09f546462fc030dc08c3189f7 /gweb
parentacdc215b11a42566027a3272c48d9ccf2f99c09b (diff)
downloadconnman-08c4340d59408e72604d72d961714ca8c5230640.tar.gz
connman-08c4340d59408e72604d72d961714ca8c5230640.tar.bz2
connman-08c4340d59408e72604d72d961714ca8c5230640.zip
gweb: Skip hostname resolving when proxy is used
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gweb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 229989ef..5de10836 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1100,7 +1100,7 @@ static guint do_request(GWeb *web, const char *url,
session->header_done = FALSE;
session->body_done = FALSE;
- if (inet_aton(session->host, NULL) == 0) {
+ if (session->address == NULL && inet_aton(session->host, NULL) == 0) {
session->resolv_action = g_resolv_lookup_hostname(web->resolv,
session->host, resolv_result, session);
if (session->resolv_action == 0) {
@@ -1108,7 +1108,8 @@ static guint do_request(GWeb *web, const char *url,
return 0;
}
} else {
- session->address = g_strdup(session->host);
+ if (session->address == NULL)
+ session->address = g_strdup(session->host);
if (create_transport(session) < 0) {
free_session(session);