logd: fix time passed via unix fd
authorJohn Crispin <blogic@openwrt.org>
Tue, 18 Mar 2014 06:58:38 +0000 (06:58 +0000)
committerJohn Crispin <blogic@openwrt.org>
Tue, 18 Mar 2014 06:58:38 +0000 (06:58 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
log/logd.c

index e4f9b3f895e43411459260ad35d9fa53a99003e1..5c614f6101c9b2d2269f25068c48035e419b0386 100644 (file)
@@ -98,7 +98,7 @@ read_log(struct ubus_context *ctx, struct ubus_object *obj,
                blobmsg_add_u32(&b, "id", l->id);
                blobmsg_add_u32(&b, "priority", l->priority);
                blobmsg_add_u32(&b, "source", l->source);
-               blobmsg_add_u64(&b, "time", l->ts.tv_sec);
+               blobmsg_add_u64(&b, "time", l->ts.tv_sec * 1000LL);
                l = log_list(count, l);
                if (ustream_write(&cl->s.stream, (void *) b.head, blob_len(b.head) + sizeof(struct blob_attr), false) <= 0)
                        break;