Difference for server/init.c from version 1.11 to 1.12


version 1.11 version 1.12
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_init_c =   * static char *rcsid_init_c =
  *   "$Id: init.c,v 1.11 2001/03/07 07:24:30 mwedel Exp $";   *   "$Id: init.c,v 1.12 2001/04/06 00:40:18 michtoen Exp $";
  */   */
   
 /*  /*
Line 67
 
Line 67
 void set_csport(char *val)  void set_csport(char *val)
 {   {
     settings.csport=atoi(val);      settings.csport=atoi(val);
   #ifndef WIN32 // ***win32: set_csport: we remove csport error secure check here, do this later
     if (settings.csport<=0 || settings.csport>32765 ||      if (settings.csport<=0 || settings.csport>32765 ||
  (settings.csport<1024 && getuid()!=0)) {   (settings.csport<1024 && getuid()!=0)) {
  fprintf(stderr,"%d is an invalid csport number.\n",settings.csport);   fprintf(stderr,"%d is an invalid csport number.\n",settings.csport);
  exit(1);   exit(1);
     }      }
   #endif // win32
 }  }
   
 static void stat_loss_on_death_true() {settings.stat_loss_on_death = 1; }  static void stat_loss_on_death_true() {settings.stat_loss_on_death = 1; }
Line 317
 
Line 319
   
     parse_args(argc, argv, 3);      parse_args(argc, argv, 3);
   
   #ifndef WIN32 // ***win32: no BecomeDaemon in windows
     if (settings.daemonmode)      if (settings.daemonmode)
  logfile = BecomeDaemon(settings.logfilename[0]=='\0'?"logfile":settings.logfilename);   logfile = BecomeDaemon(settings.logfilename[0]=='\0'?"logfile":settings.logfilename);
   #endif
   
     init_beforeplay();      init_beforeplay();
     init_ericserver();      init_ericserver();
Line 552
 
Line 556
   printf("Random encounter:\t<false>\n");    printf("Random encounter:\t<false>\n");
 #endif  #endif
   printf("Max_time:\t%d\n",MAX_TIME);    printf("Max_time:\t%d\n",MAX_TIME);
   
   #ifdef WIN32 // ***win32 compile_info(): remove execl...
     printf("Logfilename:\t%s\n",settings.logfilename);
     exit(0);
   #else
   execl("/bin/uname", "uname", "-a", NULL);    execl("/bin/uname", "uname", "-a", NULL);
   LOG(llevError, "Opps, should't have gotten here.");    LOG(llevError, "Opps, should't have gotten here.");
   perror("execl");    perror("execl");
   exit(-1);    exit(-1);
   #endif
 }  }
   
 /* Signal handlers: */  /* Signal handlers: */
Line 589
 
Line 599
  * be looked at later on, and maybe fix the problem that caused it to   * be looked at later on, and maybe fix the problem that caused it to
  * dump core.  There is no reason that SIGPIPES should be fatal   * dump core.  There is no reason that SIGPIPES should be fatal
  */   */
 #if 1  #if 1 && !defined(WIN32) // ***win32: we don't want send SIGPIPE
   LOG(llevInfo,"\nReceived SIGPIPE, ignoring...\n");    LOG(llevInfo,"\nReceived SIGPIPE, ignoring...\n");
   signal(SIGPIPE,rec_sigpipe);/* hocky-pux clears signal handlers */    signal(SIGPIPE,rec_sigpipe);/* hocky-pux clears signal handlers */
 #else  #else
Line 621
 
Line 631
 }  }
   
 void init_signals() {  void init_signals() {
   #ifndef WIN32 // init_signals() remove signals
   signal(SIGHUP,rec_sighup);    signal(SIGHUP,rec_sighup);
   signal(SIGINT,rec_sigint);    signal(SIGINT,rec_sigint);
   signal(SIGQUIT,rec_sigquit);    signal(SIGQUIT,rec_sigquit);
Line 630
 
Line 641
   signal(SIGBUS,rec_sigbus);    signal(SIGBUS,rec_sigbus);
 #endif  #endif
   signal(SIGTERM,rec_sigterm);    signal(SIGTERM,rec_sigterm);
   #endif // win32
 }  }
   
 /*  /*


Legend:
line(s) removed in v.1.11 
line(s) changed
 line(s) added in v.1.12

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:34