Add some debug handling for received packets in DHCP library
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 29 Jul 2010 21:11:30 +0000 (14:11 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 29 Jul 2010 21:11:30 +0000 (14:11 -0700)
gdhcp/client.c

index c163b44..7a44724 100644 (file)
@@ -977,6 +977,9 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
                /* No message type option, ignore pakcage */
                return TRUE;
 
+       debug(dhcp_client, "received DHCP packet (current state %d)",
+                                                       dhcp_client->state);
+
        switch (dhcp_client->state) {
        case INIT_SELECTING:
                if (*message_type != DHCPOFFER)
@@ -1039,6 +1042,9 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
                break;
        }
 
+       debug(dhcp_client, "processed DHCP packet (new state %d)",
+                                                       dhcp_client->state);
+
        return TRUE;
 }