X-Git-Url: http://git.pk910.de/?p=TransparentIRC.git;a=blobdiff_plain;f=src%2FUserSession.c;h=66dd2cf415b28a2bef294d8fea757add120460dc;hp=644332f416873916749342181a2238f18a25223a;hb=79b5ee62665a460214046003cdbe1b4b4f1fa39e;hpb=9d6d43ef738ec4ea700d1ab62bae892d69bede8a diff --git a/src/UserSession.c b/src/UserSession.c index 644332f..66dd2cf 100644 --- a/src/UserSession.c +++ b/src/UserSession.c @@ -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;