Changeset 8076ec0 for conf.c


Ignore:
Timestamp:
2007-12-05T01:30:50Z (16 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
dc0ba9c
Parents:
dce3903 (diff), 793cc25 (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:

merges from upstream/release

ulim 2007-12-04 Follow rename of jabber_chat_by_jid from upstrem

ulim 2007-12-04 Merged in current devel
Wilmer van der Gaast 2007-12-02 Imported setuid() patch from Simo Leone <simo@archlinux...> with some
Wilmer van der Gaast 2007-12-02 Forgot to return something in jabber_chat_join_failed().
Wilmer van der Gaast 2007-12-02 Merging a change I should've pulled before committing three other changes.
Wilmer van der Gaast 2007-12-02 Added charset checks on incoming msgs (from the IRC side) to prevent possible
Wilmer van der Gaast 2007-12-02 Handling of presence-error packets (only useful for groupchats now), moved
Wilmer van der Gaast 2007-12-02 Defining DEBUG via CFLAGS so that it'll always be there, even when a file
ulim 2007-12-04 Jabber file transfer now also with sending! You can't use a proxy yet when
Wilmer van der Gaast 2007-12-02 Removed retarded printf() (ARGH) and moved the event handling handling of
Wilmer van der Gaast 2007-11-29 printf() in daemons considered harmful.
Wilmer van der Gaast 2007-11-28 Fixed the epoll+ForkDaemon combination. The libevent event handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    rdce3903 r8076ec0  
    6363        conf->ping_interval = 180;
    6464        conf->ping_timeout = 300;
     65        conf->user = NULL;
    6566        conf->max_filetransfer_size = G_MAXUINT;
    6667        proxytype = 0;
     
    7778        }
    7879       
    79         while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:" ) ) >= 0 )
     80        while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:" ) ) >= 0 )
    8081        /*     ^^^^ Just to make sure we skip this step from the REHASH handler. */
    8182        {
     
    133134                                "  -D  Daemon mode. (Still EXPERIMENTAL!)\n"
    134135                                "  -F  Forking daemon. (one process per client)\n"
     136                                "  -u  Run daemon as specified user.\n"
    135137                                "  -P  Specify PID-file (not for inetd mode)\n"
    136138                                "  -i  Specify the interface (by IP address) to listen on.\n"
     
    152154                        ipc_master_set_statefile( optarg );
    153155                }
     156                else if( opt == 'u' )
     157                {
     158                        g_free( conf->user );
     159                        conf->user = g_strdup( optarg );
     160                }
    154161        }
    155162       
     
    193200                        else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 )
    194201                        {
     202                                g_free( conf->iface );
    195203                                conf->iface = g_strdup( ini->value );
    196204                        }
    197205                        else if( g_strcasecmp( ini->key, "daemonport" ) == 0 )
    198206                        {
     207                                g_free( conf->port );
    199208                                conf->port = g_strdup( ini->value );
    200209                        }
     
    210219                        else if( g_strcasecmp( ini->key, "authpassword" ) == 0 )
    211220                        {
     221                                g_free( conf->auth_pass );
    212222                                conf->auth_pass = g_strdup( ini->value );
    213223                        }
    214224                        else if( g_strcasecmp( ini->key, "operpassword" ) == 0 )
    215225                        {
     226                                g_free( conf->oper_pass );
    216227                                conf->oper_pass = g_strdup( ini->value );
    217228                        }
    218229                        else if( g_strcasecmp( ini->key, "hostname" ) == 0 )
    219230                        {
     231                                g_free( conf->hostname );
    220232                                conf->hostname = g_strdup( ini->value );
    221233                        }
     
    282294                                g_free( url );
    283295                        }
     296                        else if( g_strcasecmp( ini->key, "user" ) == 0 )
     297                        {
     298                                g_free( conf->user );
     299                                conf->user = g_strdup( ini->value );
     300                        }
    284301                        else
    285302                        {
Note: See TracChangeset for help on using the changeset viewer.