modified IOMultiplexer (added epoll & kevent support)
[TransparentIRC.git] / src / UserSession.c
index 644332f416873916749342181a2238f18a25223a..66dd2cf415b28a2bef294d8fea757add120460dc 100644 (file)
@@ -142,14 +142,16 @@ void usersession_login(struct UserLogin *login) {
             userclient_login_failed(login, "Login Script error.");
             return;
         }
-        struct IODescriptor *iofd = iohandler_add(fp, IOTYPE_CLIENT, usersession_login_callback);
+        struct IODescriptor *iofd = iohandler_add(fp, IOTYPE_CLIENT, NULL, usersession_login_callback);
         if(iofd) {
             iofd->read_lines = 1;
             iofd->state = IO_CONNECTED;
             int timeout = get_int_field("auth.external.timeout");
             if(timeout) {
-                gettimeofday(&iofd->timeout, NULL);
-                iofd->timeout.tv_sec += timeout;
+                struct timeval tv_timeout;
+                gettimeofday(&tv_timeout, NULL);
+                tv_timeout.tv_sec += timeout;
+                iohandler_set_timeout(iofd, &tv_timeout);
             }
             iofd->data = login;
             login->login_iofd = iofd;