From 284486667b0fb47c234aa254a1983fc4fe6d59ad Mon Sep 17 00:00:00 2001 From: tzafrir Date: Wed, 6 Sep 2006 20:19:39 +0000 Subject: * fpga_load.c: fix a size error. Now works on amd64 . * fpga_load -vvv now dumps the transmitted packet. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1418 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/utils/fpga_load.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xpp/utils/fpga_load.c') diff --git a/xpp/utils/fpga_load.c b/xpp/utils/fpga_load.c index 0f44340..e4d4e91 100644 --- a/xpp/utils/fpga_load.c +++ b/xpp/utils/fpga_load.c @@ -313,7 +313,7 @@ int send_hexline(struct usb_dev_handle *handle, struct hexline *hexline, int seq phead->d.data_packet.seq = seq; phead->d.data_packet.reserved = 0x00; memcpy(phead->d.data_packet.data, data, len); - len += sizeof(phead); + len += sizeof(hexline->d.content.header); if(verbose >= LOG_INFO) INFO("%04d+\r", seq); ret = usb_bulk_write(handle, MY_EP_OUT, (char *)phead, len, TIMEOUT); @@ -324,6 +324,8 @@ int send_hexline(struct usb_dev_handle *handle, struct hexline *hexline, int seq ERR("usb: bulk_write short write (%d)\n", ret); return -EFAULT; } + if (verbose >= LOG_DEBUG) + dump_packet((char*)phead, len); ret = usb_bulk_read(handle, MY_EP_IN, buf, sizeof(buf), TIMEOUT); if(ret < 0) { ERR("usb: bulk_read failed (%d)\n", ret); -- cgit v1.2.3