diff options
author | Rob Stradling <rob@comodo.com> | 2016-05-20 13:45:15 +0100 |
---|---|---|
committer | Rob Stradling <rob@comodo.com> | 2016-05-20 13:45:15 +0100 |
commit | ab9c27330b71741028c3af0184b33794e55248cb (patch) | |
tree | 91aa2e6979f3f8bd016405dac62d3198ffccc7ae | |
parent | 16bb8dfb95bc8a0658919667a6f273956ed2a674 (diff) | |
download | ct_monitor-ab9c27330b71741028c3af0184b33794e55248cb.zip ct_monitor-ab9c27330b71741028c3af0184b33794e55248cb.tar.gz ct_monitor-ab9c27330b71741028c3af0184b33794e55248cb.tar.bz2 |
Let import_ct_cert() update ct_log.latest_entry_id.
-rw-r--r-- | ct_monitor.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ct_monitor.c b/ct_monitor.c index 1b2258f..a7b7ff9 100644 --- a/ct_monitor.c +++ b/ct_monitor.c @@ -221,7 +221,7 @@ int main( json_object* j_extraData = NULL; array_list* t_entriesArr = NULL; uint32_t t_entryID; - uint32_t t_confirmedEntryID; + uint32_t t_confirmedEntryID = -1; uint64_t t_timestamp; int64_t t_sthTimestamp; int t_treeSize; @@ -704,13 +704,11 @@ int main( sprintf( t_query[0], "UPDATE ct_log" - " SET LATEST_ENTRY_ID=%d," - " LATEST_UPDATE=statement_timestamp()," + " SET LATEST_UPDATE=statement_timestamp()," " LATEST_STH_TIMESTAMP=TIMESTAMP WITH TIME ZONE 'epoch'" " + interval'%" LENGTH64 "d seconds'" " + interval'%" LENGTH64 "d milliseconds'" " WHERE ID=%s", - t_entryID, t_sthTimestamp / 1000, t_sthTimestamp % 1000, PQgetvalue(t_PGresult_select, i, 0) @@ -734,10 +732,8 @@ label_exit: sprintf( t_query[0], "UPDATE ct_log" - " SET LATEST_ENTRY_ID=%d," - " LATEST_UPDATE=statement_timestamp()" + " SET LATEST_UPDATE=statement_timestamp()" " WHERE ID=%s", - t_confirmedEntryID, PQgetvalue(t_PGresult_select, i, 0) ); t_PGresult = PQexec(t_PGconn, t_query[0]); |