]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_http_client.cpp
Damn strict typing to hell
[user/henk/code/inspircd.git] / src / modules / m_http_client.cpp
index 7e1b94f11f04f36eb784931bc6583cfa0dc5a19f..a2f80687fa4306ca927f188ef67e3dd6254399bf 100644 (file)
@@ -64,7 +64,8 @@ class HTTPResolver : public Resolver
        
        void OnError(ResolverError e, const string &errmsg)
        {
-               delete socket;
+               if (ServerInstance->SocketCull.find(socket) == ServerInstance->SocketCull.end())
+                       ServerInstance->SocketCull[socket] = socket;
        }
 };
 
@@ -175,10 +176,10 @@ bool HTTPSocket::ParseURL(const std::string &iurl)
        
        for (int p = 0;; p++)
        {
-               std::string part = tokenizer.GetToken();
-               if (part.empty() && tokenizer.StreamEnd())
+               std::string part;
+               if (!tokenizer.GetToken(part))
                        break;
-               
+
                if ((p == 0) && (part[part.length() - 1] == ':'))
                {
                        // Protocol ('http:')