~andreserl/ubuntu/lucid/keepalived/merge-from-squeeze-lp519940

« back to all changes in this revision

Viewing changes to keepalived/core/global_data.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-05-12 20:26:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090512202615-k850bw35qpuvpq4p
Tags: 1.1.17-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules: DEB_UPDATE_RCD_PARAMS := expicit init start/stop
    parameters (don't stop at 0 and 6)
  - debian/init.d: init script header adapted to stop rule
  - debian/keepalived.postinst: Remove shutdown and reboot links

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Part:        Dynamic data structure definition.
7
7
 *
8
 
 * Version:     $Id: global_data.c,v 1.1.15 2007/09/15 04:07:41 acassen Exp $
 
8
 * Version:     $Id: global_data.c,v 1.1.17 2009/03/05 01:31:12 acassen Exp $
9
9
 *
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
22
 * Copyright (C) 2001-2009 Alexandre Cassen, <acassen@freebox.fr>
23
23
 */
24
24
 
25
25
#include <syslog.h>
28
28
#include "global_data.h"
29
29
#include "memory.h"
30
30
#include "list.h"
 
31
#include "logger.h"
31
32
#include "utils.h"
32
33
 
33
34
/* global vars */
109
110
dump_email(void *data_obj)
110
111
{
111
112
        char *addr = data_obj;
112
 
        syslog(LOG_INFO, " Email notification = %s", addr);
 
113
        log_message(LOG_INFO, " Email notification = %s", addr);
113
114
}
114
115
 
115
116
void
155
156
 
156
157
        if (data->router_id ||
157
158
            data->smtp_server || data->smtp_connection_to || data->email_from) {
158
 
                syslog(LOG_INFO, "------< Global definitions >------");
 
159
                log_message(LOG_INFO, "------< Global definitions >------");
159
160
        }
160
161
        if (data->router_id)
161
 
                syslog(LOG_INFO, " Router ID = %s", data->router_id);
 
162
                log_message(LOG_INFO, " Router ID = %s", data->router_id);
162
163
        if (data->plugin_dir)
163
 
                syslog(LOG_INFO, " Plugin dir = %s", data->plugin_dir);
 
164
                log_message(LOG_INFO, " Plugin dir = %s", data->plugin_dir);
164
165
        if (data->smtp_server)
165
 
                syslog(LOG_INFO, " Smtp server = %s",
 
166
                log_message(LOG_INFO, " Smtp server = %s",
166
167
                       inet_ntop2(data->smtp_server));
167
168
        if (data->smtp_connection_to)
168
 
                syslog(LOG_INFO, " Smtp server connection timeout = %lu",
 
169
                log_message(LOG_INFO, " Smtp server connection timeout = %lu",
169
170
                       data->smtp_connection_to / TIMER_HZ);
170
171
        if (data->email_from) {
171
 
                syslog(LOG_INFO, " Email notification from = %s",
 
172
                log_message(LOG_INFO, " Email notification from = %s",
172
173
                       data->email_from);
173
174
                dump_list(data->email);
174
175
        }