From 00851dc6346d9c1e02d09885029e5ba32a4094e8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 24 May 2018 19:42:28 +0300 Subject: [PATCH] Fix build for Windows. --- JitterBuffer.cpp | 4 ++-- OpusDecoder.h | 2 +- VoIPController.cpp | 12 ++++++------ VoIPController.h | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/JitterBuffer.cpp b/JitterBuffer.cpp index 83b9c33267..bbc813a618 100644 --- a/JitterBuffer.cpp +++ b/JitterBuffer.cpp @@ -219,7 +219,7 @@ void JitterBuffer::PutInternal(jitter_packet_t* pkt){ wasReset=false; outstandingDelayChange=0; nextTimestamp=((int64_t)pkt->timestamp)-step*minDelay; - LOGI("jitter: resyncing, next timestamp = %lld (step=%d, minDelay=%d)", (long long int)nextTimestamp, step, minDelay); + LOGI("jitter: resyncing, next timestamp = %lld (step=%d, minDelay=%d)", (long long int)nextTimestamp, step, int(minDelay)); } for(i=0;i::iterator p=participants.begin();p!=participants.end();++p){ if(p->userID==userID){ @@ -1225,11 +1225,11 @@ void VoIPController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint* srcE uint32_t innerLen=(uint32_t) in.ReadInt32(); if(innerLen>decryptedLen-4){ - LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, decryptedLen); + LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, (unsigned int)decryptedLen); return; } if(decryptedLen-innerLen<12){ - LOGW("Received packet has too little padding (%u)", decryptedLen-innerLen); + LOGW("Received packet has too little padding (%u)", (unsigned int)(decryptedLen-innerLen)); return; } memcpy(buffer, decrypted+4, innerLen); @@ -1706,7 +1706,7 @@ simpleAudioBlock random_id:long random_bytes:string raw_data:string = DecryptedA void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint *srcEndpoint){ //LOGD("Received incoming packet from %s:%u, %u bytes", packet.address->ToString().c_str(), packet.port, packet.length); if(packet.length<17 || packet.length>2000){ - LOGW("Received packet has wrong length %d", packet.length); + LOGW("Received packet has wrong length %d", (int)packet.length); return; } BufferOutputStream sigData(packet.length); @@ -1863,11 +1863,11 @@ void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint uint32_t innerLen=(uint32_t) in.ReadInt32(); if(innerLen>decryptedLen-4){ - LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, decryptedLen); + LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, (unsigned int)decryptedLen); return; } if(decryptedLen-innerLen<12){ - LOGW("Received packet has too little padding (%u)", decryptedLen-innerLen); + LOGW("Received packet has too little padding (%u)", (unsigned int)(decryptedLen-innerLen)); return; } in=BufferInputStream(decrypted+4, (size_t) innerLen); diff --git a/VoIPController.h b/VoIPController.h index 3701ffe1ea..8421fec6cc 100644 --- a/VoIPController.h +++ b/VoIPController.h @@ -35,6 +35,7 @@ #ifdef _WIN32 #undef GetCurrentTime +#undef ERROR_TIMEOUT #endif #define TGVOIP_PEER_CAP_GROUP_CALLS 1