Author: tjansen Date: Thu Oct 8 16:26:21 2009 New Revision: 1058 Log: Commented out preauth code in pisasd. The ultimate goal is to remove preauth code from PISA. For reference which parts of the code are good candidates for removal, the relevant sections were commented out with #ifdef REMOVE_PREAUTH_CODE. Functions only called from within those blocks should be considered deprecated and be removed when the big cleanup begins. Modified: trunk/pisasd/sdmain.c Modified: trunk/pisasd/sdmain.c ============================================================================== --- trunk/pisasd/sdmain.c Thu Oct 8 16:17:59 2009 (r1057) +++ trunk/pisasd/sdmain.c Thu Oct 8 16:26:21 2009 (r1058) @@ -367,14 +367,21 @@ FD_ZERO(&readfds); FD_SET(sd_ctx.tunc, &readfds); FD_SET(sd_ctx.tund, &readfds); +#ifdef REMOVE_PREAUTH_CODE FD_SET(sd_ctx.fd_pstunc, &readfds); /* TODO: why is this here? it's not used below -- Thomas */ FD_SET(sd_ctx.fd_pstuns, &readfds); +#endif /* REMOVE_PREAUTH_CODE */ FD_SET(sd_ctx.tunnel, &readfds); FD_SET(sd_ctx.fd_pisaconf,&readfds); +#ifdef REMOVE_PREAUTH_CODE maxfd = 1 + pisa_maxof(6, sd_ctx.tunc, sd_ctx.tund, sd_ctx.fd_pstunc, sd_ctx.fd_pstuns, sd_ctx.tunnel,sd_ctx.tunnel); +#else + maxfd = 1 + pisa_maxof(4, sd_ctx.tunc, sd_ctx.tund, + sd_ctx.tunnel,sd_ctx.tunnel); +#endif /* REMOVE_PREAUTH_CODE */ if (select(maxfd + 1, &readfds, NULL, NULL, &select_to) > 0) { if (FD_ISSET(sd_ctx.tunc, &readfds)) @@ -383,8 +390,10 @@ if (FD_ISSET(sd_ctx.tund, &readfds)) pisa_sd_copy_from_sock_to_tun(); +#ifdef REMOVE_PREAUTH_CODE if (FD_ISSET(sd_ctx.fd_pstuns, &readfds)) pisa_message_pstun(sd_ctx.fd_pstuns); +#endif /* REMOVE_PREAUTH_CODE */ if (FD_ISSET(sd_ctx.tunnel, &readfds)) pisa_sd_copy_from_tun_to_sock(); @@ -393,7 +402,9 @@ pisa_conf_handle_packet(sd_ctx.fd_pisaconf); } +#ifdef REMOVE_PREAUTH_CODE sd_start_alarm(); +#endif /* REMOVE_PREAUTH_CODE */ } }