summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-07-25 11:50:26 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-07-25 11:50:26 -0700
commit4faa2bedac24a8332f007f3f90219a156ccd444f (patch)
tree850a73c2c4f2c9c8017647500c20cbc40ea4e140 /plugins
parent07a94078b2555852355b10f56c28da55d4fe74dc (diff)
downloadconnman-4faa2bedac24a8332f007f3f90219a156ccd444f.tar.gz
connman-4faa2bedac24a8332f007f3f90219a156ccd444f.tar.bz2
connman-4faa2bedac24a8332f007f3f90219a156ccd444f.zip
Add more debug output to DHCP client plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dhcp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/dhcp.c b/plugins/dhcp.c
index a10cb0e8..7f8577b2 100644
--- a/plugins/dhcp.c
+++ b/plugins/dhcp.c
@@ -39,11 +39,16 @@ static void no_lease_cb(GDHCPClient *dhcp_client, gpointer user_data)
{
struct connman_dhcp *dhcp = user_data;
- DBG("No Lease Available!");
+ DBG("No lease available");
connman_dhcp_fail(dhcp);
}
+static void lease_lost_cb(GDHCPClient *dhcp_client, gpointer user_data)
+{
+ DBG("Lease lost");
+}
+
static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data)
{
struct connman_dhcp *dhcp = user_data;
@@ -51,6 +56,8 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data)
char *address, *nameservers;
size_t ns_strlen = 0;
+ DBG("Lease available");
+
address = g_dhcp_client_get_address(dhcp_client);
if (address != NULL)
connman_dhcp_set_value(dhcp, "Address", address);
@@ -114,6 +121,9 @@ static int dhcp_request(struct connman_dhcp *dhcp)
lease_available_cb, dhcp);
g_dhcp_client_register_event(dhcp_client,
+ G_DHCP_CLIENT_EVENT_LEASE_LOST, lease_lost_cb, dhcp);
+
+ g_dhcp_client_register_event(dhcp_client,
G_DHCP_CLIENT_EVENT_NO_LEASE, no_lease_cb, dhcp);
connman_dhcp_set_data(dhcp, dhcp_client);