mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 19:26:31 -04:00
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:
parent
41aa675a9b
commit
329050a9c2
223 changed files with 930 additions and 911 deletions
|
@ -39,7 +39,7 @@
|
|||
#endif // ifdef RS_JSONAPI
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include "util/rstime.h"
|
||||
|
||||
#include "pqi/p3peermgr.h"
|
||||
#include "pqi/p3netmgr.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "pqi/authssl.h"
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include "util/rstime.h"
|
||||
|
||||
#include "pqi/p3peermgr.h"
|
||||
#include "pqi/p3linkmgr.h"
|
||||
|
@ -51,7 +51,7 @@ int rsserverzone = 101;
|
|||
|
||||
#define WARN_BIG_CYCLE_TIME (0.2)
|
||||
#ifdef WINDOWS_SYS
|
||||
#include <time.h>
|
||||
#include "util/rstime.h"
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
|
@ -251,7 +251,7 @@ void RsServer::data_tick()
|
|||
|
||||
/* Tick slow services */
|
||||
if(rsPlugins)
|
||||
rsPlugins->slowTickPlugins((time_t)ts);
|
||||
rsPlugins->slowTickPlugins((rstime_t)ts);
|
||||
|
||||
// slow update tick as well.
|
||||
// update();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
//const int p3facemsgzone = 11453;
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include "util/rstime.h"
|
||||
|
||||
#include "retroshare/rstypes.h"
|
||||
#include "rsserver/p3msgs.h"
|
||||
|
|
|
@ -745,7 +745,7 @@ bool p3Peers::addFriend(const RsPeerId &ssl_id, const RsPgpId &gpg_id,ServicePe
|
|||
* If we are adding an SSL certificate. we flag lastcontact as now.
|
||||
* This will cause the SSL certificate to be retained for 30 days... and give the person a chance to connect!
|
||||
* */
|
||||
time_t now = time(NULL);
|
||||
rstime_t now = time(NULL);
|
||||
return mPeerMgr->addFriend(ssl_id, gpg_id, RS_NET_MODE_UDP, RS_VS_DISC_FULL, RS_VS_DHT_FULL, now, perm_flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "retroshare/rstypes.h"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <time.h>
|
||||
#include "util/rstime.h"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue