Quote:
Originally Posted by nrapallo
I think there is something really weird going on with your if statement above and impserve! It may be that eb1150 is lacking something in this situation.
I tried to debug eb1150 (by placing debug printf's after each if segment to print the data); this is the code I used:
Code:
if (data.length() > 0) {
// Parse and dispatch to the proxy methods
if (data.find("gethostbyname") != string::npos) {
cout << "1: " << data << " gethostname\n";
gethostbyname(data);
} else if (data.find("socket") != string::npos) {
cout << "2: " << data << " socket\n";
socket(data);
} else if (data.find("connect") != string::npos) {
cout << "3: " << data << " connect\n";
connect(data);
} else if (data.find("send") != string::npos) {
cout << "4: " << data << " send\n";
send(data);
} else if (data.find("recv") != string::npos) {
cout << "5: " << data << " recv\n";
recv(data);
} else if (data.find("close") != string::npos) {
cout << "6: " << data << " close\n";
close(data);
}
}
I don't understand where all those 0 byte(s) items are being sent from. I tried closing the socket once the 0's showed up, but to no avail. Please note that I numerically ordered the printf's and saw that for (some) transfers the order was 2,3,4,5,6,5 with the last 5 after a close (6) and thus would produce a recv errno = 9.
Now where to look further...
BTW, I think I remember seeing all those 0 byte message when first using Linreb with hyperlinks to the internet, so it may very well be a eb1150 (linux usb driver) issue.
Is there a way to use the ETI (windows) usb driver with wine and bypass eb1150?
|
I think that the problem might be very subtle, and require lots of time to debug! Essentially, the eb1150 thinks that there is data when actually there is none coming from the content server [hence the 0 size requests]. We need to check if a Content-Length is set which makes the device expect more data. Also Proxy1150::recv ultimately does a Proxy1150::ack that it got the data -- we need to see whether the same response is sent which is done by the original USB driver.