/[radius]/radius/radiusd/radiusd.c
ViewVC logotype

Diff of /radius/radiusd/radiusd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.126 by gray, Thu Jun 5 07:04:31 2003 UTC revision 1.127 by gray, Thu Jun 5 14:29:43 2003 UTC
# Line 141  char *x_debug_spec; Line 141  char *x_debug_spec;
141  /* Forward declarations */  /* Forward declarations */
142  static RETSIGTYPE sig_handler(int sig);  static RETSIGTYPE sig_handler(int sig);
143  void radiusd_main_loop();  void radiusd_main_loop();
144    static size_t radius_count_channels();
145            
146  struct cfg_stmt config_syntax[];  struct cfg_stmt config_syntax[];
147    
148    
# Line 300  radiusd_preconfig_hook(void *a ARG_UNUSE Line 301  radiusd_preconfig_hook(void *a ARG_UNUSE
301          rpp_kill(-1, SIGTERM);          rpp_kill(-1, SIGTERM);
302          sleep(2);          sleep(2);
303          radiusd_cleanup();          radiusd_cleanup();
304            if (rpp_count()) {
305                    rpp_kill(-1, SIGKILL);
306                    radiusd_cleanup();
307            }
308          input_close_channels(radius_input);          input_close_channels(radius_input);
309  }  }
310    
311  static void  static void
312  radiusd_postconfig_hook(void *a ARG_UNUSED, void *b ARG_UNUSED)  radiusd_postconfig_hook(void *a ARG_UNUSED, void *b ARG_UNUSED)
313  {  {
314          /*FIXME: Emit the warning:          if (radius_count_channels() == 0) {
315            radlog(L_ALERT,                  radlog(L_ALERT,
316            _("Radiusd is not listening on any port.                         _("Radiusd is not listening on any port. Trying to continue anyway..."));
317            Trying to continue anyway..."));          }
   
           If necessary..*/  
318  }  }
319    
320  void  void
# Line 1131  udp_open(int type, UINT4 ipaddr, int por Line 1134  udp_open(int type, UINT4 ipaddr, int por
1134          return 0;          return 0;
1135  }  }
1136    
1137    static int
1138    channel_counter(void *item, void *data)
1139    {
1140            struct udp_data *p = item;
1141            if (p->type == R_AUTH || p->type == R_ACCT)
1142                    ++*(size_t*)data;
1143            return 0;
1144    }
1145    
1146    static size_t
1147    radius_count_channels()
1148    {
1149            size_t count = 0;
1150            
1151            input_iterate_channels(radius_input, "udp", channel_counter, &count);
1152            return count;
1153    }
1154    
1155    
1156  /* ************************************************************************* */  /* ************************************************************************* */
1157    

Legend:
Removed from v.1.126  
changed lines
  Added in v.1.127

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26