diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-12-07 19:12:15 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-12-07 19:12:15 +0100 |
commit | 4b6c97b8de6d9dba605d7a4a01e06b15c2d5c252 (patch) | |
tree | 7cdd04f8b9574fbcf95334ec430ad0a25c8b20d5 | |
parent | a552fc4ef996e8456803796ee1e6a053b0da9cdf (diff) | |
parent | a73dc505075c6ec948952891835ac95c6c6a5f40 (diff) | |
download | biruda-4b6c97b8de6d9dba605d7a4a01e06b15c2d5c252.tar.gz biruda-4b6c97b8de6d9dba605d7a4a01e06b15c2d5c252.tar.bz2 |
Merge branch 'master' of ssh://andreasbaumann.dyndns.org:2222/biruda
-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 ); |