The call to 'getifaddrs' delivers one interface
description with an ip address and one description
with the mac address. I noticed that CyberLink tries
to open ports with the mac-adresses - which are
actually treated as IPv6 adresses - because of the
colon ':'.
This might lead to unsuccessfull socket creations,
which in turn, may not get noticed by the software as
can be seen in 'HTTPMUSocket': The constructor
calls 'open' - which returns 'false'. But the return
value is discarded in the constructor, the caller
cannot see if the creation was successfull. This
results in a BADFD-error in recvfrom() - which isn't
treated correctly again: The receive-loop loops
endlessly, consuming all cpu resources.
I suggest to add the following if-case in the above
mentioned function:
if(ifaddr->ifa_addr->sa_family != AF_INET){
ifaddr = ifaddr->ifa_next;
continue;
}
My Testing environmet is a rather exotic os (QNX
6.3.0) and I'm not sure why this function works on
other unixoid os'es.
Greets,
Tobias
Logged In: YES
user_id=559351
Hi Tobias,
I added your patch to the latest CVS tree of CyberLink C++
and C, it seems that the patch is no problem on Unix
platform.
Thanks for your report :-)