Diff

Differences From Artifact [776212fe50]:

To Artifact [8b7ede8efd]:


   226    226   	}
   227    227   
   228    228   	return(fd);
   229    229   }
   230    230   
   231    231   /* Log a message */
   232    232   #ifdef FILED_DONT_LOG
   233         -struct filed_log_entry filed_dummy_log_entry;
   234    233   #  define filed_logging_thread_init(x) 0
   235    234   #  define filed_log_msg_debug(x, ...) /**/
   236    235   #  define filed_log_msg(x, ...) /**/
   237    236   #  define filed_log_entry(x) /**/
   238    237   #  define filed_log_ip(x, ...) NULL
   239         -#  define filed_log_new(x) &filed_dummy_log_entry
          238  +#  define filed_log_new(x) &local_dummy_log
   240    239   #else
   241    240   #  ifdef FILED_DEBUG
   242    241   #    define filed_log_msg_debug(x, ...) { fprintf(stderr, x, __VA_ARGS__); fprintf(stderr, "\n"); fflush(stderr); }
   243    242   #  else
   244    243   #    define filed_log_msg_debug(x, ...) /**/
   245    244   #  endif
   246    245   
................................................................................
   868    867   	return;
   869    868   }
   870    869   
   871    870   /* Handle incoming connections */
   872    871   static void *filed_worker_thread(void *arg_v) {
   873    872   	struct filed_worker_thread_args *arg;
   874    873   	struct filed_http_request request;
   875         -	struct filed_log_entry *log;
          874  +	struct filed_log_entry *log, local_dummy_log;
   876    875   	struct sockaddr_in6 addr;
   877         -	char logbuf_ip[128];
   878    876   	socklen_t addrlen;
   879    877   	int failure_count = 0, max_failure_count = FILED_MAX_FAILURE_COUNT;
   880    878   	int master_fd, fd;
   881    879   
   882    880   	/* Read arguments */
   883    881   	arg = arg_v;
   884    882   
................................................................................
   929    927   	}
   930    928   
   931    929   	/* Report error */
   932    930   	filed_log_msg("THREAD_DIED ABNORMAL");
   933    931   
   934    932   	return(NULL);
   935    933   
   936         -	/* Make compiler happy */
   937         -	logbuf_ip[0] = '\0';
   938         -	logbuf_ip[0] = logbuf_ip[0];
   939         -
          934  +	/* local_dummy_log is only used if FILED_DONT_LOG is anebled, otherwise it's not used, but the compiler hates that idea. */
          935  +	local_dummy_log.type = 0;
          936  +	local_dummy_log.type = local_dummy_log.type;
   940    937   }
   941    938   
   942    939   /* Create worker threads */
   943    940   static int filed_worker_threads_init(int fd, int thread_count) {
   944    941   	struct filed_worker_thread_args *arg;
   945    942   	pthread_t threadid;
   946    943   	int pthread_ret;