summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-06-07 19:00:04 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-06-07 19:03:02 +0200
commit0394ef444535bb2c5551dfb33dfb6673ef7dd740 (patch)
tree11f647f574619c2d223de0fda283dc54512473a2 /plugins
parentf1e6754c96248260ae5013bbc03444140417b856 (diff)
downloadconnman-0394ef444535bb2c5551dfb33dfb6673ef7dd740.tar.gz
connman-0394ef444535bb2c5551dfb33dfb6673ef7dd740.tar.bz2
connman-0394ef444535bb2c5551dfb33dfb6673ef7dd740.zip
Add some more portal plugin debug strings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/portal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/portal.c b/plugins/portal.c
index b30ea7af..c937c253 100644
--- a/plugins/portal.c
+++ b/plugins/portal.c
@@ -167,6 +167,7 @@ static gboolean tcp_event(GIOChannel *channel, GIOCondition condition,
return FALSE;
if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
+ connman_error("TCP event error %d", condition);
remove_timeout(data);
data->watch = 0;
if (data->get_page)
@@ -257,12 +258,16 @@ static int get_html(struct connman_location *location, int ms_time)
int ret;
char *ip = NULL;
+ DBG("");
+
data = connman_location_get_data(location);
data->connection_ready = 0;
data->sock = create_socket();
if (data->sock < 0)
goto error;
+ DBG("proxy %s port %d", data->proxy, data->proxy_port);
+
if (strlen(data->proxy) > 0)
ip = get_ip_from_host(data->proxy);
else {
@@ -341,15 +346,19 @@ static int get_status(struct server_data *data, char *page, int len)
str = g_strrstr(lines[0], "200 OK");
if (str != NULL) {
for (i = 0; lines[i] != NULL && i < 12; i++) {
+ DBG("%s", lines[i]);
str = g_strstr_len(lines[i], 12, "Set-Cookie");
if (str != NULL) {
g_strfreev(lines);
+ DBG("success");
return GET_PAGE_SUCCESS;
}
}
}
g_strfreev(lines);
+ DBG("redirection");
+
return GET_PAGE_REDIRECTED;
}
@@ -366,6 +375,8 @@ static int get_page_cb(struct connman_location *location, char *page, int len,
else
ret = status;
+ DBG("status %d", status);
+
switch (ret) {
case GET_PAGE_SUCCESS:
connman_location_report_result(location,
@@ -399,6 +410,9 @@ static int location_detect(struct connman_location *location)
enum connman_service_type service_type;
service_type = connman_location_get_type(location);
+
+ DBG("service type %d", service_type);
+
switch (service_type) {
case CONNMAN_SERVICE_TYPE_ETHERNET:
case CONNMAN_SERVICE_TYPE_WIFI: