|
Line
Link Here
|
|
-- src/main.c |
|
|
|
Lines 158-166
Link Here
|
| 158 |
*/ |
158 |
*/ |
| 159 |
|
159 |
|
| 160 |
static int sighuprecvd = 0; |
160 |
static int sighuprecvd = 0; |
|
|
161 |
int update_hostname_on_hup = 0; |
| 161 |
|
162 |
|
| 162 |
void sig_hup(int signo) |
163 |
void sig_hup(int signo) |
| 163 |
{ |
164 |
{ |
|
|
165 |
update_hostname_on_hup = 1; |
| 164 |
sighuprecvd = 1; |
166 |
sighuprecvd = 1; |
| 165 |
signal(SIGHUP, sig_hup); |
167 |
signal(SIGHUP, sig_hup); |
| 166 |
} |
168 |
} |
| 167 |
-- src/sources.c |
|
|
|
Lines 60-65
Link Here
|
| 60 |
(next object log_handler))) |
60 |
(next object log_handler))) |
| 61 |
*/ |
61 |
*/ |
| 62 |
|
62 |
|
|
|
63 |
extern int update_hostname_on_hup; |
| 64 |
|
| 63 |
static int |
65 |
static int |
| 64 |
do_handle_line(struct log_reader *self, |
66 |
do_handle_line(struct log_reader *self, |
| 65 |
UINT32 length, UINT8 *data, |
67 |
UINT32 length, UINT8 *data, |
|
Lines 224-229
Link Here
|
| 224 |
name = c_format_cstring("%z", hname); |
226 |
name = c_format_cstring("%z", hname); |
| 225 |
} |
227 |
} |
| 226 |
else { |
228 |
else { |
|
|
229 |
if (update_hostname_on_hup && hostname) { |
| 230 |
update_hostname_on_hup = 0; |
| 231 |
ol_string_free(hostname); |
| 232 |
hostname = NULL; |
| 233 |
} |
| 227 |
if (!hostname) { |
234 |
if (!hostname) { |
| 228 |
char buf[128]; |
235 |
char buf[128]; |
| 229 |
if (usefqdn) { |
236 |
if (usefqdn) { |