Re: [Clinkc-devel] [bug report] clinkc/src/cybergarage/net/cinterface_function.c
Brought to you by:
skonno
From: Aapo M. <aap...@no...> - 2007-04-18 06:04:34
|
Hi and sorry for the late reply! Thanks for reporting this bug, I committed the patch to Clinkc trunk. Br, Aapo ext minhong wrote: > Hi, all > I found a bug in file located > at clinkc/src/cybergarage/net/cinterface_function.c > In the function of cg_net_gethostinterfaces(), UNIX version, I think > the following lines should be changed : > > 338 // if (getnameinfo(i->ifa_addr, sizeof(struct sockaddr), addr, > NI_MAXHOST, NULL, 0, NI_NUMERICHOST) == 0) > 339 if (getnameinfo(i->ifa_addr, sizeof(struct sockaddr), addr, > NI_MAXHOST, NULL, 0, NI_NUMERICHOST) != 0) > 342 // if (getnameinfo(i->ifa_netmask, sizeof(struct sockaddr), > netmask, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) == 0) > 343 if (getnameinfo(i->ifa_netmask, sizeof(struct sockaddr), > netmask, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) != 0) > 351 // cg_net_interface_setnetmask(netIf, addr); > 352 cg_net_interface_setnetmask(netIf, netmask); > > > Briefly to say, the return value of getnameinfo will be 0 on > success, however, in the originial source code > it seems that return value of 0 is an error ? That makes an > interface be a wrong one such that an upnp device can't get started. > > Also, the 2nd parameter of cg_net_interface_setnetmask() should be > netmask instead of addr, right ? > > > After I make the 3 changes, the sample of clock device works well as > running on Windows. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Clinkc-devel mailing list > Cli...@li... > https://lists.sourceforge.net/lists/listinfo/clinkc-devel |