Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    r2a6ca4f rf4a5940  
    6464        conf->ping_interval = 180;
    6565        conf->ping_timeout = 300;
     66        proxytype = 0;
    6667       
    6768        i = conf_loadini( conf, CONF_FILE );
     
    7677        }
    7778       
    78         while( ( opt = getopt( argc, argv, "i:p:nvIDFc:d:h" ) ) >= 0 )
     79        while( argc > 0 && ( opt = getopt( argc, argv, "i:p:nvIDFc:d:h" ) ) >= 0 )
     80        /*     ^^^^ Just to make sure we skip this step from the REHASH handler. */
    7981        {
    8082                if( opt == 'i' )
     
    9294                }
    9395                else if( opt == 'n' )
    94                         conf->nofork=1;
     96                        conf->nofork = 1;
    9597                else if( opt == 'v' )
    96                         conf->verbose=1;
     98                        conf->verbose = 1;
    9799                else if( opt == 'I' )
    98                         conf->runmode=RUNMODE_INETD;
     100                        conf->runmode = RUNMODE_INETD;
    99101                else if( opt == 'D' )
    100                         conf->runmode=RUNMODE_DAEMON;
     102                        conf->runmode = RUNMODE_DAEMON;
    101103                else if( opt == 'F' )
    102                         conf->runmode=RUNMODE_FORKDAEMON;
     104                        conf->runmode = RUNMODE_FORKDAEMON;
    103105                else if( opt == 'c' )
    104106                {
     
    108110                                CONF_FILE = g_strdup( optarg );
    109111                                g_free( conf );
     112                                /* Re-evaluate arguments. Don't use this option twice,
     113                                   you'll end up in an infinite loop! Hope this trick
     114                                   works with all libcs BTW.. */
     115                                optind = 1;
    110116                                return( conf_load( argc, argv ) );
    111117                        }
Note: See TracChangeset for help on using the changeset viewer.