10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
-
+
|
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
/* Default values */
#define MAX_FAILURE_COUNT 30
#define PORT 8081
#define PORT 8080
#define THREAD_COUNT 10
#define BIND_ADDR "::"
/* Arguments for worker threads */
struct filed_worker_thread_args {
int fd;
};
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
+
+
|
#else
/* Initialize logging thread */
static int filed_logging_thread_init(void) {
/* XXX:TODO: Unimplemented */
return(0);
}
/* XXX:TODO: Unimplemented */
#define filed_log_msg_debug(x, ...) { fprintf(stderr, x, __VA_ARGS__); fprintf(stderr, "\n"); fflush(stderr); }
static void filed_log_msg(const char *buffer) {
/* XXX:TODO: Unimplemented */
fprintf(stderr, "%s\n", buffer);
return;
}
|