summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 04:08:20 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 04:08:20 +0000
commit8ed74be517990d100bdfe237a002d5115ea85a5e (patch)
treeb9d50cac1077d59fb06cc9b164572573ad393e7a /src/inspsocket.cpp
parentde25d946733f774e3a5b53a58438a9c92af0acbe (diff)
Fix crash due to null address in DNS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index ebf6e3b9d..60c69559d 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -46,7 +46,7 @@ void BufferedSocket::DoConnect(const std::string &ipaddr, int aport, unsigned lo
BufferedSocketError BufferedSocket::BeginConnect(const std::string &ipaddr, int aport, unsigned long maxtime, const std::string &connectbindip)
{
irc::sockets::sockaddrs addr, bind;
- if (!irc::sockets::aptosa(ipaddr.c_str(), aport, &addr))
+ if (!irc::sockets::aptosa(ipaddr, aport, &addr))
{
ServerInstance->Logs->Log("SOCKET", DEBUG, "BUG: Hostname passed to BufferedSocket, rather than an IP address!");
return I_ERR_CONNECT;
@@ -55,7 +55,7 @@ BufferedSocketError BufferedSocket::BeginConnect(const std::string &ipaddr, int
bind.sa.sa_family = 0;
if (!connectbindip.empty())
{
- if (!irc::sockets::aptosa(connectbindip.c_str(), 0, &bind))
+ if (!irc::sockets::aptosa(connectbindip, 0, &bind))
{
return I_ERR_BIND;
}