[maemo-commits] [maemo-commits] r17500 - projects/haf/trunk/ke-recv/src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Feb 24 09:51:30 EET 2009
Author: kihamala
Date: 2009-02-24 09:51:25 +0200 (Tue, 24 Feb 2009)
New Revision: 17500

Modified:
   projects/haf/trunk/ke-recv/src/ke-recv.c
Log:
make debug prints more useful


Modified: projects/haf/trunk/ke-recv/src/ke-recv.c
===================================================================
--- projects/haf/trunk/ke-recv/src/ke-recv.c	2009-02-24 07:34:41 UTC (rev 17499)
+++ projects/haf/trunk/ke-recv/src/ke-recv.c	2009-02-24 07:51:25 UTC (rev 17500)
@@ -1627,7 +1627,8 @@
         }
 
         if (prop == NULL) {
-                ULOG_ERR_F("couldn't read USB mode");
+                ULOG_ERR_F("couldn't read 'usb_device.mode' from %s",
+                           usb_cable_udi);
                 ret = S_INVALID_USB_STATE;
         } else if (strcmp(prop, "b_peripheral") == 0 ||
                    strcmp(prop, "a_peripheral") == 0) {
@@ -1776,8 +1777,6 @@
         static int retry_times = 100;
         gboolean do_e_plugged = (gboolean)data;
 
-        ULOG_DEBUG_F("entered");
-
         if (usb_state != S_INVALID_USB_STATE) {
                 ULOG_DEBUG_F("usb_state is already valid"); 
                 return FALSE;
@@ -1785,10 +1784,11 @@
 
         usb_state = get_usb_state();
         if (usb_state == S_INVALID_USB_STATE) {
-                if (--retry_times > 0)
+                if (--retry_times > 0) {
                         /* try again later */
+                        ULOG_DEBUG_F("%d retry times left", retry_times);
                         return TRUE;
-                else {
+                } else {
                         ULOG_DEBUG_F("max. retry times reached, giving up");
                         return FALSE;
                 }


More information about the maemo-commits mailing list