Diff

Differences From Artifact [776212fe50]:

To Artifact [8b7ede8efd]:


226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
...
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
...
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
	}

	return(fd);
}

/* Log a message */
#ifdef FILED_DONT_LOG
struct filed_log_entry filed_dummy_log_entry;
#  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) &filed_dummy_log_entry
#else
#  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

................................................................................
	return;
}

/* Handle incoming connections */
static void *filed_worker_thread(void *arg_v) {
	struct filed_worker_thread_args *arg;
	struct filed_http_request request;
	struct filed_log_entry *log;
	struct sockaddr_in6 addr;
	char logbuf_ip[128];
	socklen_t addrlen;
	int failure_count = 0, max_failure_count = FILED_MAX_FAILURE_COUNT;
	int master_fd, fd;

	/* Read arguments */
	arg = arg_v;

................................................................................
	}

	/* Report error */
	filed_log_msg("THREAD_DIED ABNORMAL");

	return(NULL);

	/* Make compiler happy */
	logbuf_ip[0] = '\0';
	logbuf_ip[0] = logbuf_ip[0];

}

/* Create worker threads */
static int filed_worker_threads_init(int fd, int thread_count) {
	struct filed_worker_thread_args *arg;
	pthread_t threadid;
	int pthread_ret;







<





|







 







|

<







 







|
|
|
<







226
227
228
229
230
231
232

233
234
235
236
237
238
239
240
241
242
243
244
245
...
867
868
869
870
871
872
873
874
875

876
877
878
879
880
881
882
...
927
928
929
930
931
932
933
934
935
936

937
938
939
940
941
942
943
	}

	return(fd);
}

/* Log a message */
#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
#else
#  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

................................................................................
	return;
}

/* Handle incoming connections */
static void *filed_worker_thread(void *arg_v) {
	struct filed_worker_thread_args *arg;
	struct filed_http_request request;
	struct filed_log_entry *log, local_dummy_log;
	struct sockaddr_in6 addr;

	socklen_t addrlen;
	int failure_count = 0, max_failure_count = FILED_MAX_FAILURE_COUNT;
	int master_fd, fd;

	/* Read arguments */
	arg = arg_v;

................................................................................
	}

	/* Report error */
	filed_log_msg("THREAD_DIED ABNORMAL");

	return(NULL);

	/* local_dummy_log is only used if FILED_DONT_LOG is anebled, otherwise it's not used, but the compiler hates that idea. */
	local_dummy_log.type = 0;
	local_dummy_log.type = local_dummy_log.type;

}

/* Create worker threads */
static int filed_worker_threads_init(int fd, int thread_count) {
	struct filed_worker_thread_args *arg;
	pthread_t threadid;
	int pthread_ret;