[pisa-src] r1138 - trunk/pisacd/cdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 14:11:35 +0200

Author: tjansen
Date: Wed Oct 14 14:11:35 2009
New Revision: 1138

Log:
Deprecated more preauth code in cdmain.c

Modified:
   trunk/pisacd/cdmain.c

Modified: trunk/pisacd/cdmain.c
==============================================================================
--- trunk/pisacd/cdmain.c       Wed Oct 14 13:28:01 2009        (r1137)
+++ trunk/pisacd/cdmain.c       Wed Oct 14 14:11:35 2009        (r1138)
@@ -84,8 +84,10 @@
 /**
  * Timeout management variables
  */
+#ifdef REMOVE_PREAUTH_CODE
 static time_t init_pareq_period;
 static time_t currentTime;
+#endif /* REMOVE_PREAUTH_CODE */
 
 /**
  * Prototype declarations of functions.
@@ -96,21 +98,23 @@
 
 #ifdef REMOVE_PREAUTH_CODE
 static void add_fds_to_fdset(void *data, cdConMgrEntry *entry);
-#endif /* REMOVE_PREAUTH_CODE */
 static inline void send_pareq_to_ap(void);
 static inline void send_bureq_to_tp(void);
 static inline void cd_read_inbound_msgs(int fd);
 static void cd_process_new_client(char *buf, struct sockaddr_in *src_addr);
 static void cd_process_known_client(cdConMgrEntry * entry, char *buf, size_t 
len);
 static inline void cd_check_manage_timeout(void);
+#endif /* REMOVE_PREAUTH_CODE */
 
 static void cd_get_cmdargs(int argc, char **argv);
 static void cd_print_usage(char **argv);
 static void cd_print_version(void);
 static void cd_reload_confs(int quitcode);
 static void cd_quit(int quitcode);
+#ifdef REMOVE_PREAUTH_CODE
 static void cd_handle_sigalarm(int sigcode);
 static void cd_start_alarm(void);
+#endif /* REMOVE_PREAUTH_CODE */
 static inline int cd_get_maxfd(void);
 
 /**
@@ -164,7 +168,9 @@
        signal(SIGHUP, cd_reload_confs);
        signal(SIGPIPE, SIG_IGN);
        signal(SIGBUS, cd_quit);
+#ifdef REMOVE_PREAUTH_CODE
        signal(SIGALRM, cd_handle_sigalarm);
+#endif /* REMOVE_PREAUTH_CODE */
 
        /* Set default values in context and config */
        cdctx_init(&cd_ctx);
@@ -252,8 +258,10 @@
        pisa_conf_read_file("foo", pisa_cdconf_parse);
 */
 
+#ifdef REMOVE_PREAUTH_CODE
        /* set the default alarm */
        cd_start_alarm();
+#endif /* REMOVE_PREAUTH_CODE */
 
        /* We should start sending pareq packets in the beginning. */
        cd_ctx.is_sending_pareq = TRUE;
@@ -511,6 +519,7 @@
        }
 }
 
+#ifdef REMOVE_PREAUTH_CODE
 /**
  * Read function for inbound messages.
  *
@@ -703,6 +712,7 @@
                time(&init_pareq_period);
        }
 }
+#endif /* REMOVE_PREAUTH_CODE */
 
 /**
  * Get command line arguments and parse them.
@@ -915,6 +925,7 @@
        return maxfd;
 }
 
+#ifdef REMOVE_PREAUTH_CODE
 /**
  * This handler is executed periodically by SIGALRM.
  *
@@ -951,6 +962,7 @@
        alarm(PISACD_DEFAULT_ALARM_INTERVAL);
 /*     PISA_DEBUG(PL_PREAUTH, "Starting alarm with %d seconds.\n", 
PISACD_DEFAULT_ALARM_INTERVAL);*/
 }
+#endif /* REMOVE_PREAUTH_CODE */
 
 #ifdef CONFIG_PISA_PERFORMANCE
 

Other related posts:

  • » [pisa-src] r1138 - trunk/pisacd/cdmain.c - Thomas Jansen