Overview
Comment: | Fixed compilation issues with no logging mode |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b4740ac3ab88061cb5814de8ab90ded5 |
User & Date: | rkeene on 2015-07-29 14:28:17 |
Other Links: | manifest | tags |
Context
2015-07-29
| ||
14:29 | Added an ifdef for exposing an AFL-compatible testing mode check-in: f505311236 user: rkeene tags: trunk | |
14:28 | Fixed compilation issues with no logging mode check-in: b4740ac3ab user: rkeene tags: trunk | |
2014-12-29
| ||
04:39 | Updated to be more aggressive in encoding wiki characters in man pages check-in: 74424b0987 user: rkeene tags: trunk | |
Changes
Modified filed.c from [974bab36c9] to [5f2e24471a].
︙ | ︙ | |||
263 264 265 266 267 268 269 | struct sockaddr_in addr_v4; struct sockaddr *addr; socklen_t addr_len; int pton_ret, bind_ret, listen_ret; int family; int fd; | < | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | struct sockaddr_in addr_v4; struct sockaddr *addr; socklen_t addr_len; int pton_ret, bind_ret, listen_ret; int family; int fd; family = AF_INET6; pton_ret = inet_pton(family, address, &addr_v6.sin6_addr.s6_addr); if (pton_ret != 1) { family = AF_INET; pton_ret = inet_pton(family, address, &addr_v4.sin_addr.s_addr); if (pton_ret != 1) { return(-1); |
︙ | ︙ | |||
318 319 320 321 322 323 324 | #ifdef FILED_DONT_LOG # define filed_logging_thread_init(x) 0 # define filed_log_msg_debug(x, ...) /**/ # define filed_log_msg(x, ...) /**/ # define filed_log_entry(x) /**/ # define filed_log_ip(x, ...) NULL # define filed_log_new(x) &local_dummy_log | | > > > > > > > | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | #ifdef FILED_DONT_LOG # define filed_logging_thread_init(x) 0 # define filed_log_msg_debug(x, ...) /**/ # define filed_log_msg(x, ...) /**/ # define filed_log_entry(x) /**/ # define filed_log_ip(x, ...) NULL # define filed_log_new(x) &local_dummy_log # define filed_log_free(x) /**/ /* Return logging handle */ static FILE *filed_log_open(const char *file) { return(stdout); file = file; } #else # define filed_log_free(x) free(x) # ifdef FILED_DEBUG # define filed_log_msg_debug(x, ...) { fprintf(stderr, x, __VA_ARGS__); fprintf(stderr, "\n"); fflush(stderr); } # else # define filed_log_msg_debug(x, ...) /**/ # endif /* Initialize logging thread */ |
︙ | ︙ | |||
1159 1160 1161 1162 1163 1164 1165 | */ if (fd < 0) { /* Log the new connection */ filed_log_msg("ACCEPT_FAILED"); failure_count++; | | | 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 | */ if (fd < 0) { /* Log the new connection */ filed_log_msg("ACCEPT_FAILED"); failure_count++; filed_log_free(log); continue; } /* Fill in log structure */ if (filed_log_ip((struct sockaddr *) &addr, log->ip, sizeof(log->ip)) == NULL) { log->ip[0] = '\0'; |
︙ | ︙ |