Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232608
b: refs/heads/master
c: 7e249c8
h: refs/heads/master
v: v3
  • Loading branch information
Max Vozeler authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent c542872 commit b338ff9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d212153a838354078cc7d96f9bb23b7d1fd3d1b
refs/heads/master: 7e249c8b0737429bbf534515f81aded93504f449
16 changes: 14 additions & 2 deletions trunk/drivers/staging/usbip/vhci_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,23 @@ static void vhci_rx_pdu(struct usbip_device *ud)

memset(&pdu, 0, sizeof(pdu));


/* 1. receive a pdu header */
ret = usbip_xmit(0, ud->tcp_socket, (char *) &pdu, sizeof(pdu), 0);
if (ret < 0) {
if (ret == -ECONNRESET)
usbip_uinfo("connection reset by peer\n");
else if (ret != -ERESTARTSYS)
usbip_uinfo("xmit failed %d\n", ret);
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
return;
}
if (ret == 0) {
usbip_uinfo("connection closed");
usbip_event_add(ud, VDEV_EVENT_DOWN);
return;
}
if (ret != sizeof(pdu)) {
usbip_uerr("receiving pdu failed! size is %d, should be %d\n",
usbip_uerr("received pdu size is %d, should be %d\n",
ret, (unsigned int)sizeof(pdu));
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
return;
Expand Down

0 comments on commit b338ff9

Please sign in to comment.