[dahdi-commits] tzafrir: tools/trunk r6616 - /tools/trunk/xpp/mpp_funcs.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed May 13 15:02:32 CDT 2009
Author: tzafrir
Date: Wed May 13 15:02:29 2009
New Revision: 6616
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6616
Log:
xpp: better error reporting when failing to talk to a pre-MPP Astribank.
Modified:
tools/trunk/xpp/mpp_funcs.c
Modified: tools/trunk/xpp/mpp_funcs.c
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/xpp/mpp_funcs.c?view=diff&rev=6616&r1=6615&r2=6616
==============================================================================
--- tools/trunk/xpp/mpp_funcs.c (original)
+++ tools/trunk/xpp/mpp_funcs.c Wed May 13 15:02:29 2009
@@ -254,14 +254,16 @@
ERR("Out of memory\n");
goto err;
}
+ reply->header.len = 0;
ret = recv_usb(astribank, (char *)reply, PACKET_SIZE, timeout);
if(ret < 0) {
ERR("Receive from usb failed.\n");
goto err;
}
if(ret != reply->header.len) {
- ERR("Wrong length received: got %d bytes, but length field says %d bytes\n",
- ret, reply->header.len);
+ ERR("Wrong length received: got %d bytes, but length field says %d bytes%s\n",
+ ret, reply->header.len,
+ (ret == 1)? ". Old USB firmware?": "");
goto err;
}
//dump_packet(LOG_DEBUG, __FUNCTION__, (char *)reply, ret);
More information about the dahdi-commits
mailing list