mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-22 11:38:29 +00:00
time_t conversions made explicit
This commit is contained in:
+1
-1
@@ -941,7 +941,7 @@ void EQStream::SendSessionRequest()
|
||||
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionRequest,nullptr,sizeof(SessionRequest));
|
||||
SessionRequest *Request=(SessionRequest *)out->pBuffer;
|
||||
memset(Request,0,sizeof(SessionRequest));
|
||||
Request->Session=htonl(time(nullptr));
|
||||
Request->Session=htonl((u_long)time(nullptr));
|
||||
Request->MaxLength=htonl(512);
|
||||
|
||||
_log(NET__NET_TRACE, _L "Sending OP_SessionRequest: session %lu, maxlen=%d" __L, (unsigned long)ntohl(Request->Session), ntohl(Request->MaxLength));
|
||||
|
||||
@@ -540,7 +540,7 @@ ENCODE(OP_TaskDescription)
|
||||
outapp->WriteUInt32(in->ReadUInt32()); // Duration
|
||||
outapp->WriteUInt32(in->ReadUInt32()); // Unknown
|
||||
uint32 StartTime = in->ReadUInt32();
|
||||
outapp->WriteUInt32(time(nullptr) - StartTime); // RoF has elapsed time here rather than starttime
|
||||
outapp->WriteUInt32((uint32)(time(nullptr) - StartTime)); // RoF has elapsed time here rather than starttime
|
||||
|
||||
// Copy the rest of the packet verbatim
|
||||
uint32 BytesLeftToCopy = in->size - in->GetReadPosition();
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ int gettimeofday (timeval *tp, ...)
|
||||
|
||||
ftime (&tb);
|
||||
|
||||
tp->tv_sec = tb.time;
|
||||
tp->tv_sec = (long)tb.time;
|
||||
tp->tv_usec = tb.millitm * 1000;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user