]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/ssl.h
Fix some minor oversights introduced in 859a799 and 3e557e8.
[user/henk/code/inspircd.git] / include / modules / ssl.h
index 2227c4b13246893fd492d361256c9aff63a8fc74..ac2e367fd00eb04e92320d1c7241c53140015e37 100644 (file)
@@ -186,9 +186,10 @@ class SSLIOHook : public IOHook
  public:
        static SSLIOHook* IsSSL(StreamSocket* sock)
        {
-               IOHook* const iohook = sock->GetIOHook();
-               if ((iohook) && ((iohook->prov->type == IOHookProvider::IOH_SSL)))
-                       return static_cast<SSLIOHook*>(iohook);
+               IOHook* const lasthook = sock->GetLastHook();
+               if (lasthook && (lasthook->prov->type == IOHookProvider::IOH_SSL))
+                       return static_cast<SSLIOHook*>(lasthook);
+
                return NULL;
        }