s3:dbwrap: Use milliseconds for "Held tdb lock" message
authorChristof Schmitt <cs@samba.org>
Tue, 14 Jan 2014 21:23:04 +0000 (14:23 -0700)
committerVolker Lendecke <vl@samba.org>
Thu, 16 Jan 2014 10:19:39 +0000 (11:19 +0100)
This is consistent with the parameter using milliseconds and the other
warnings in the same file also using milliseconds.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 16 11:19:39 CET 2014 on sn-devel-104

source3/lib/dbwrap/dbwrap_ctdb.c

index a81b97aeb521e96e75883f42fda1a13c836a1ae8..98a9138f32f0aff8ea4122355ee39c7196982766 100644 (file)
@@ -986,16 +986,17 @@ static int db_ctdb_record_destr(struct db_record* data)
 
        threshold = crec->ctdb_ctx->warn_locktime_msecs;
        if (threshold != 0) {
-               timediff = timeval_elapsed(&crec->lock_time);
-               if ((timediff * 1000) > threshold) {
+               timediff = timeval_elapsed(&crec->lock_time) * 1000;
+               if (timediff > threshold) {
                        const char *key;
 
                        key = hex_encode_talloc(data,
                                                (unsigned char *)data->key.dptr,
                                                data->key.dsize);
-                       DEBUG(0, ("Held tdb lock on db %s, key %s %f seconds\n",
-                                 tdb_name(crec->ctdb_ctx->wtdb->tdb), key,
-                                 timediff));
+                       DEBUG(0, ("Held tdb lock on db %s, key %s "
+                                 "%f milliseconds\n",
+                                 tdb_name(crec->ctdb_ctx->wtdb->tdb),
+                                 key, timediff));
                }
        }