remove some exit(1)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2425 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-25 22:43:04 +00:00
parent 5de1f4db50
commit be5957742c
4 changed files with 5 additions and 12 deletions

View File

@ -143,7 +143,7 @@ std::list<std::string> getLocalInterfaces()
{ {
pqioutput(PQL_ALERT, pqinetzone, pqioutput(PQL_ALERT, pqinetzone,
"Cannot Determine Local Addresses!"); "Cannot Determine Local Addresses!");
exit(1); return addrs;
} }
if (!ifptr) if (!ifptr)

View File

@ -211,9 +211,8 @@ int pqissllistenbase::setuplisten()
out << " Cannot Bind to Local Address!" << std::endl; out << " Cannot Bind to Local Address!" << std::endl;
showSocketError(out); showSocketError(out);
pqioutput(PQL_ALERT, pqissllistenzone, out.str()); pqioutput(PQL_ALERT, pqissllistenzone, out.str());
std::cerr << out.str() << std::endl; std::cerr << out.str() << std::endl;
exit(1);
return -1; return -1;
} }
else else
@ -232,7 +231,6 @@ int pqissllistenbase::setuplisten()
pqioutput(PQL_ALERT, pqissllistenzone, out.str()); pqioutput(PQL_ALERT, pqissllistenzone, out.str());
std::cerr << out.str() << std::endl; std::cerr << out.str() << std::endl;
exit(1);
return -1; return -1;
} }
else else

View File

@ -1818,7 +1818,7 @@ int TcpStream::toSend(TcpPacket *pkt, bool retrans)
std::cerr << "TcpStream::toSend() peerUnknown ERROR!!!"; std::cerr << "TcpStream::toSend() peerUnknown ERROR!!!";
std::cerr << std::endl; std::cerr << std::endl;
#endif #endif
exit(1); return 0;
} }
/* get accurate timestamp */ /* get accurate timestamp */
@ -1908,7 +1908,7 @@ int TcpStream::retrans()
std::cerr << "TcpStream::retrans() peerUnknown ERROR!!!"; std::cerr << "TcpStream::retrans() peerUnknown ERROR!!!";
std::cerr << std::endl; std::cerr << std::endl;
#endif #endif
exit(1); return 0;
} }
/* now retrans */ /* now retrans */

View File

@ -72,7 +72,7 @@ int tou_init(const struct sockaddr *my_addr, socklen_t addrlen)
<< inet_ntoa(addr->sin_addr) << ":" << ntohs(addr->sin_port); << inet_ntoa(addr->sin_addr) << ":" << ntohs(addr->sin_port);
std::cerr << std::endl; std::cerr << std::endl;
exit(1); return 0;
} }
return 1; return 1;
} }
@ -198,11 +198,6 @@ int tou_socket(int /*domain*/, int /*type*/, int /*protocol*/)
tou -> lasterrno = EUSERS; tou -> lasterrno = EUSERS;
return -1; return -1;
#ifdef DEBUG_TOU_INTERFACE
std::cerr << "tou_socket() FAILED" << std::endl;
exit(1);
#endif
} }
/* bind - opens the udp port */ /* bind - opens the udp port */