~ubuntu-branches/ubuntu/feisty/syslog-ng/feisty-security

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): SZALAY Attila
  • Date: 2005-06-09 20:10:54 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050609201054-gpuo1bz4xv33edld
Tags: 1.6.8-1
* New upstream version.
* Debian patch cleaned up. If something needed dropped out please tell me!
* Create /dev/xconsole if not exists. (Closes: #312690)
* Check the config file for syntax errors before reload. (Closes: #294888)
* Fixed a typo in syslog-ng.conf (Closes: #312114)
* Created a directory. Put debian specific patches into it.
* Added the new version of syslog-ng-annon patch. (Closes: #303808)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *
20
20
 * Inspired by nsyslog, originally written by Darren Reed.
21
21
 *
22
 
 * $Id: main.c,v 1.49 2003/09/24 14:02:31 bazsi Exp $
 
22
 * $Id: main.c,v 1.49.4.2 2005/01/20 17:30:17 bazsi Exp $
23
23
 *
24
24
 ***************************************************************************/
25
25
 
69
69
 
70
70
        switch (self->state) {
71
71
        case -1:
 
72
                self->backend->super.reloading = 1;
72
73
                self->state++;
73
74
                break;
74
75
        case 0:
205
206
                        CONFIG_DESTROY(backend->configuration, 0);
206
207
                        break;
207
208
                }
208
 
                if (reload_config) {
 
209
                if (reload_config && r.state == 0) {
 
210
                        /* reload initiated and callout started by SIGHUP finished, e.g. r.state == 0 */
209
211
                        backend->newconfig = make_syslog_config(cfgfilename, &backend->super);
210
212
                        if (backend->newconfig) {
211
213
                                
235
237
                }
236
238
                if (sighuprecvd) {
237
239
                        sighuprecvd = 0;
238
 
                        if (!backend->super.reloading) {
 
240
                        if (!backend->super.reloading && !reload_config) {
239
241
#if HAVE_RES_INIT
240
242
                                res_init();
241
243
#endif
244
246
                                        set_error_stream(2, 0);
245
247
                                        set_internal_cfg(NULL);
246
248
                                }
247
 
                                backend->super.reloading = 1;
248
249
                                reload_config = 1;
249
250
                                r.backend = backend;
250
251
                                r.state = -1;
425
426
#endif
426
427
        gc_idle_threshold = 100;
427
428
        gc_busy_threshold = 3000;
 
429
        
 
430
        tzset();
428
431
 
429
432
        while ((opt = getopt_long(argc, argv, "sFf:p:dvhyVC:u:g:", syslog_ng_options, NULL)) != -1) {
430
433
                switch (opt) {