From f5c294b7355cee34df44b1c5b8ac3ef7b85664cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Luis=20Sanmart=C3=ADn=20Rozada?= Date: Thu, 19 Jun 2014 15:14:02 +0200 Subject: [PATCH] Plugin java: fix notification time conversion to cdtime_t. --- src/java.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.c b/src/java.c index b69ca946..ee503550 100644 --- a/src/java.c +++ b/src/java.c @@ -906,7 +906,7 @@ static jobject ctoj_notification (JNIEnv *jvm_env, /* {{{ */ #undef SET_STRING /* Set the `time' member. Java stores time in milliseconds. */ - status = ctoj_long (jvm_env, ((jlong) n->time) * ((jlong) 1000), + status = ctoj_long (jvm_env, (jlong) CDTIME_T_TO_MS (n->time), c_notification, o_notification, "setTime"); if (status != 0) { @@ -1306,7 +1306,7 @@ static int jtoc_notification (JNIEnv *jvm_env, notification_t *n, /* {{{ */ return (-1); } /* Java measures time in milliseconds. */ - n->time = (time_t) (tmp_long / ((jlong) 1000)); + n->time = MS_TO_CDTIME_T(tmp_long); status = jtoc_int (jvm_env, &tmp_int, class_ptr, object_ptr, "getSeverity"); -- 2.30.2