From a73dc505075c6ec948952891835ac95c6c6a5f40 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 7 Dec 2014 19:09:25 +0100 Subject: .. --- src/master.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/master.c') diff --git a/src/master.c b/src/master.c index a3d98b1..fc4768e 100644 --- a/src/master.c +++ b/src/master.c @@ -401,14 +401,14 @@ static int master_output_write_started( const char *spool_dir, json_object *obj json_object *pid_obj; json_object_object_get_ex( obj, "pid", &pid_obj ); - int pid = json_object_get_int( pid_obj ); + const char *pid_str = json_object_get_string( pid_obj ); json_object *ts_obj; json_object_object_get_ex( obj, "timestamp", &ts_obj ); time_t ts = json_object_get_int( ts_obj ); char line[1024]; - snprintf( line, sizeof( line ), "%lu %s --- STARTED %d ---\n", ts, name, pid ); + snprintf( line, sizeof( line ), "%lu %s --- STARTED %s ---\n", ts, name, pid_str ); fputs( line, wed->spool_file ); fflush( wed->spool_file ); @@ -435,14 +435,14 @@ static int master_output_write_terminated( const char *spool_dir, json_object *o json_object *pid_obj; json_object_object_get_ex( obj, "pid", &pid_obj ); - int pid = json_object_get_int( pid_obj ); + const char *pid_str = json_object_get_string( pid_obj ); json_object *ts_obj; json_object_object_get_ex( obj, "timestamp", &ts_obj ); time_t ts = json_object_get_int( ts_obj ); char line[1024]; - snprintf( line, sizeof( line ), "%lu %s --- STOPPED %d ---\n", ts, name, pid ); + snprintf( line, sizeof( line ), "%lu %s --- STOPPED %s ---\n", ts, name, pid_str ); fputs( line, wed->spool_file ); fflush( wed->spool_file ); -- cgit v1.2.3-54-g00ecf