diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-12-07 19:09:25 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-12-07 19:09:25 +0100 |
commit | a73dc505075c6ec948952891835ac95c6c6a5f40 (patch) | |
tree | 364f0e34ecf58a143bb9194877cbd5842a380507 | |
parent | c1ee4a252d82ff8ef4bf0845b4c2f21d2b4ec000 (diff) | |
download | biruda-a73dc505075c6ec948952891835ac95c6c6a5f40.tar.gz biruda-a73dc505075c6ec948952891835ac95c6c6a5f40.tar.bz2 |
..
-rw-r--r-- | src/master.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 ); |