Use safer rstime_t instead of time_t

Avoid problems to serialization on different platforms, without breaking
nested STL containers serialization.

The conversion have been made with sed, and checked with grep, plus
kdiff3 visual ispection, plus rutime tests, so it should be fine.
This commit is contained in:
Gioacchino Mazzurco 2018-10-07 01:34:05 +02:00
parent 41aa675a9b
commit 329050a9c2
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
223 changed files with 930 additions and 911 deletions

View file

@ -601,8 +601,8 @@ const ops_keydata_t *PGPHandler::locked_getPublicKey(const RsPgpId& id,bool stam
{
if(stamp_the_key) // Should we stamp the key as used?
{
static time_t last_update_db_because_of_stamp = 0 ;
time_t now = time(NULL) ;
static rstime_t last_update_db_because_of_stamp = 0 ;
rstime_t now = time(NULL) ;
res->second._time_stamp = now ;

View file

@ -57,7 +57,7 @@ class PGPCertificateInfo
uint32_t _flags ;
uint32_t _type ;
mutable time_t _time_stamp ; // last time the key was used (received, used for signature verification, etc)
mutable rstime_t _time_stamp ; // last time the key was used (received, used for signature verification, etc)
PGPFingerprintType _fpr; /* fingerprint */
// RsPgpId _key_id ;
@ -220,9 +220,9 @@ class PGPHandler
bool _pubring_changed ;
mutable bool _trustdb_changed ;
time_t _pubring_last_update_time ;
time_t _secring_last_update_time ;
time_t _trustdb_last_update_time ;
rstime_t _pubring_last_update_time ;
rstime_t _secring_last_update_time ;
rstime_t _trustdb_last_update_time ;
// Helper functions.
//