Check-in [0802341b53]
Overview
Comment:Updated to log message at startup
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0802341b53daf2cd8f1c9f4f279932e57dc5f02a
User & Date: rkeene on 2014-02-08 08:52:25
Other Links: manifest | tags
Context
2014-02-11
04:26
Updated to generate log entry only after transfer completes check-in: 273835a798 user: rkeene tags: trunk
2014-02-08
08:52
Updated to log message at startup check-in: 0802341b53 user: rkeene tags: trunk
08:46
Log formatting changes check-in: 5decd7a269 user: rkeene tags: trunk
Changes

Modified filed.c from [3095917664] to [5335f1802e].

   261    261   			free(prev);
   262    262   		}
   263    263   	}
   264    264   
   265    265   	return(NULL);
   266    266   }
   267    267   
   268         -static int filed_logging_thread_init(FILE *logfp) {
   269         -	struct filed_logging_thread_args *args;
   270         -	pthread_t thread_id;
   271         -
   272         -	args = malloc(sizeof(*args));
   273         -	args->fp = logfp;
   274         -
   275         -	filed_log_msg_list = NULL;
   276         -
   277         -	pthread_mutex_init(&filed_log_msg_list_mutex, NULL);
   278         -
   279         -	pthread_create(&thread_id, NULL, filed_logging_thread, args);
   280         -
   281         -	return(0);
   282         -}
   283         -
   284    268   static void filed_log_msg(const char *fmt, ...) {
   285    269   	struct filed_log_entry *entry;
   286    270   	va_list args;
   287    271   
   288    272   	entry = malloc(sizeof(*entry));
   289    273   
   290    274   	va_start(args, fmt);
................................................................................
   304    288   	pthread_mutex_unlock(&filed_log_msg_list_mutex);
   305    289   
   306    290   	pthread_cond_signal(&filed_log_msg_list_ready);
   307    291   
   308    292   	return;
   309    293   }
   310    294   
   311         -
   312    295   static const char *filed_log_ip(struct sockaddr *addr, char *buffer, size_t bufferlen) {
   313    296   	struct sockaddr_in *addr_v4;
   314    297   	struct sockaddr_in6 *addr_v6;
   315    298   	const char *retval = NULL;
   316    299   
   317    300   	addr_v6 = (struct sockaddr_in6 *) addr;
   318    301   
................................................................................
   328    311   
   329    312   	if (retval == NULL) {
   330    313   		retval = "<unknown>";
   331    314   	}
   332    315   
   333    316   	return(retval);
   334    317   }
          318  +
          319  +static int filed_logging_thread_init(FILE *logfp) {
          320  +	struct filed_logging_thread_args *args;
          321  +	pthread_t thread_id;
          322  +
          323  +	args = malloc(sizeof(*args));
          324  +	args->fp = logfp;
          325  +
          326  +	filed_log_msg_list = NULL;
          327  +
          328  +	pthread_mutex_init(&filed_log_msg_list_mutex, NULL);
          329  +
          330  +	pthread_create(&thread_id, NULL, filed_logging_thread, args);
          331  +
          332  +	filed_log_msg("START");
          333  +
          334  +	return(0);
          335  +}
   335    336   #endif
   336    337   
   337    338   /* Format time per RFC2616 */
   338    339   static char *filed_format_time(char *buffer, size_t buffer_len, const time_t timeinfo) {
   339    340   	struct tm timeinfo_tm, *timeinfo_tm_p;
   340    341   
   341    342   	timeinfo_tm_p = gmtime_r(&timeinfo, &timeinfo_tm);