added signal blockign trick for widgets, and fixed the bug causing wrong values to be displayed in server settings

This commit is contained in:
csoler 2017-02-27 22:29:01 +01:00
parent e7a7c171be
commit ee9fbefd76
5 changed files with 78 additions and 61 deletions

View file

@ -1020,6 +1020,11 @@ bool p3Peers::setProxyServer(const uint32_t type, const std::string &addr_str, c
std::cerr << "p3Peers::setProxyServer() " << std::endl;
#endif
if(port < 1024)
{
std::cerr << "(EE) attempt to set proxy server address to something not allowed: " << addr_str << ":" << port << std::endl;
return false ;
}
struct sockaddr_storage addr;
struct sockaddr_in *addrv4p = (struct sockaddr_in *) &addr;
addrv4p->sin_family = AF_INET;