SF Bug Tracker id 3510595 - UpnpDownloadXmlDoc : can't get the file

Submitted: Marco Virgulti ( mvirg83 ) - 2012-03-23 10:08:08 PDT

There is a problem, perhaps, during downloading a document by
UpnpDownloadXmlDoc. During debugging i've found that in an not exported
api (unfortunately i forgot the code line...) where it is setted a
local variable "int timeout" to -1 then passed directly to another
function for sending data through tcp socket. I patched this setting it
to 0 (there is an IF section that exits if timeout < 0). It is normal
behavior or it is a bug?
This commit is contained in:
Fabrice Fontaine 2012-03-24 22:08:11 +01:00
parent 5cd98b1330
commit ad617d7c9c
2 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,20 @@
Version 1.8.0
*******************************************************************************
2012-03-24 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
SF Bug Tracker id 3510595 - UpnpDownloadXmlDoc : can't get the file
Submitted: Marco Virgulti ( mvirg83 ) - 2012-03-23 10:08:08 PDT
There is a problem, perhaps, during downloading a document by
UpnpDownloadXmlDoc. During debugging i've found that in an not exported
api (unfortunately i forgot the code line...) where it is setted a
local variable "int timeout" to -1 then passed directly to another
function for sending data through tcp socket. I patched this setting it
to 0 (there is an IF section that exits if timeout < 0). It is normal
behavior or it is a bug?
2012-03-08 Fabrice Fontaine <fabrice.fontaine(at)orange-ftgroup.com>
Check for NULL pointer in TemplateSource.h

View File

@ -174,8 +174,6 @@ static int sock_read_write(
size_t byte_left = (size_t)0;
ssize_t num_written;
if (*timeoutSecs < 0)
return UPNP_E_TIMEDOUT;
FD_ZERO(&readSet);
FD_ZERO(&writeSet);
if (bRead)
@ -185,7 +183,7 @@ static int sock_read_write(
timeout.tv_sec = *timeoutSecs;
timeout.tv_usec = 0;
while (TRUE) {
if (*timeoutSecs == 0)
if (*timeoutSecs < 0)
retCode = select(sockfd + 1, &readSet, &writeSet,
NULL, NULL);
else