]> git.sur5r.net Git - openldap/commitdiff
unparse checkpoint time in minutes (ITS#6370)
authorPierangelo Masarati <ando@openldap.org>
Tue, 10 Nov 2009 19:02:33 +0000 (19:02 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 10 Nov 2009 19:02:33 +0000 (19:02 +0000)
servers/slapd/overlays/syncprov.c

index 00fb9a8c29427b513e87f4c63c83882a3af7fb93..e83da075edd3354ebe7c2c3413970b6a1feed5ab 100644 (file)
@@ -2690,8 +2690,11 @@ sp_cf_gen(ConfigArgs *c)
                case SP_CHKPT:
                        if ( si->si_chkops || si->si_chktime ) {
                                struct berval bv;
+                               /* we assume si_chktime is a multiple of 60
+                                * because the parsed value was originally
+                                * multiplied by 60 */
                                bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ),
-                                       "%d %d", si->si_chkops, si->si_chktime );
+                                       "%d %d", si->si_chkops, si->si_chktime/60 );
                                if ( bv.bv_len >= sizeof( c->cr_msg ) ) {
                                        rc = 1;
                                } else {