diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-06 20:19:39 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-06 20:19:39 +0000 |
commit | 284486667b0fb47c234aa254a1983fc4fe6d59ad (patch) | |
tree | ae0663140ef25af85a4aa05f527fc7a32dfecbcd /xpp | |
parent | 83613f14bab2f4eaa964638acfb976c716267e5f (diff) |
* 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
Diffstat (limited to 'xpp')
-rw-r--r-- | xpp/utils/fpga_load.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |