Changeset 55ec2d6 for conf.c


Ignore:
Timestamp:
2006-01-20T12:22:30Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f73b969
Parents:
fc50d48 (diff), b8c2ace (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging IPC branch, it's too different from the main code to keep it
separated (and it's pretty stable now). Have fun. :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    rfc50d48 r55ec2d6  
    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.