mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix 32-bit crashes [skip ci]
This commit is contained in:
parent
7e919ff122
commit
9ee7988147
@ -421,11 +421,11 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
_cleanupSessionIdsByAuthKeyId = [[NSMutableDictionary alloc] initWithDictionary:cleanupSessionIdsByAuthKeyId];
|
||||
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: received keychain globalTimeDifference:%f datacenterAuthInfoById:%@]", (intptr_t)self, _globalTimeDifference, _datacenterAuthInfoById);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": received keychain globalTimeDifference:%f datacenterAuthInfoById:%@]", (intptr_t)self, _globalTimeDifference, _datacenterAuthInfoById);
|
||||
}
|
||||
} else {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: received keychain nil]", (intptr_t)self);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": received keychain nil]", (intptr_t)self);
|
||||
}
|
||||
}
|
||||
}];
|
||||
@ -484,7 +484,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
_globalTimeDifference = globalTimeDifference;
|
||||
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: global time difference changed: %.1fs]", (intptr_t)self, globalTimeDifference);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": global time difference changed: %.1fs]", (intptr_t)self, globalTimeDifference);
|
||||
}
|
||||
|
||||
[_keychain setObject:@(_globalTimeDifference) forKey:@"globalTimeDifference" group:@"temp"];
|
||||
@ -506,7 +506,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
if (addressSet != nil && datacenterId != 0)
|
||||
{
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: address set updated for %d]", (intptr_t)self, datacenterId);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": address set updated for %d]", (intptr_t)self, datacenterId);
|
||||
}
|
||||
|
||||
bool updateSchemes = forceUpdateSchemes;
|
||||
@ -599,7 +599,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
if (updated)
|
||||
{
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: added address %@ for datacenter %d]", (intptr_t)self, address, datacenterId);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": added address %@ for datacenter %d]", (intptr_t)self, address, datacenterId);
|
||||
}
|
||||
|
||||
_datacenterAddressSetById[@(datacenterId)] = addressSet;
|
||||
@ -638,7 +638,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
if (MTLogEnabled()) {
|
||||
MTDatacenterAuthInfo *persistentInfo = _datacenterAuthInfoById[authInfoMapIntegerKey((int32_t)datacenterId, MTDatacenterAuthInfoSelectorPersistent)];
|
||||
|
||||
MTLog(@"[MTContext#%llx: auth info updated for %d selector %d to %@ (persistent key id is %llu)]", (intptr_t)self, datacenterId, selector, authInfo, persistentInfo.authKeyId);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": auth info updated for %d selector %d to %@ (persistent key id is %llu)]", (intptr_t)self, datacenterId, selector, authInfo, persistentInfo.authKeyId);
|
||||
}
|
||||
|
||||
[_keychain setObject:_datacenterAuthInfoById forKey:@"datacenterAuthInfoById" group:@"persistent"];
|
||||
@ -713,7 +713,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
||||
NSArray *currentListeners = [[NSArray alloc] initWithArray:_changeListeners];
|
||||
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTContext#%llx: %@ transport scheme updated for %d: %@]", (intptr_t)self, media ? @"media" : @"generic", datacenterId, transportScheme);
|
||||
MTLog(@"[MTContext#%" PRIxPTR ": %@ transport scheme updated for %d: %@]", (intptr_t)self, media ? @"media" : @"generic", datacenterId, transportScheme);
|
||||
}
|
||||
|
||||
for (id<MTContextChangeListener> listener in currentListeners) {
|
||||
|
@ -117,7 +117,7 @@
|
||||
|
||||
if (request.requestContext.messageId != 0) {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTRequestMessageService#%llx drop %" PRId64 "]", (intptr_t)self, request.requestContext.messageId);
|
||||
MTLog(@"[MTRequestMessageService#%" PRIxPTR " drop %" PRId64 "]", (intptr_t)self, request.requestContext.messageId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -933,8 +933,8 @@
|
||||
request.requestContext.responseMessageId = responseMessageId;
|
||||
return true;
|
||||
} else {
|
||||
MTLog(@"[MTRequestMessageService#%llx will not request message %" PRId64 " (transaction was not completed)]", (intptr_t)self, messageId);
|
||||
MTLog(@"[MTRequestMessageService#%llx but today it will]", (intptr_t)self);
|
||||
MTLog(@"[MTRequestMessageService#%" PRIxPTR " will not request message %" PRId64 " (transaction was not completed)]", (intptr_t)self, messageId);
|
||||
MTLog(@"[MTRequestMessageService#%" PRIxPTR " but today it will]", (intptr_t)self);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -861,14 +861,14 @@ struct ctr_state {
|
||||
if (MTLogEnabled()) {
|
||||
if (strongSelf->_socksIp != nil) {
|
||||
if (strongSelf->_socksUsername.length == 0) {
|
||||
MTLog(@"[MTTcpConnection#%llx connecting to %@:%d via %@:%d]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_socksIp, (int)strongSelf->_socksPort);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " connecting to %@:%d via %@:%d]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_socksIp, (int)strongSelf->_socksPort);
|
||||
} else {
|
||||
MTLog(@"[MTTcpConnection#%llx connecting to %@:%d via %@:%d using %@:%@]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_socksIp, (int)strongSelf->_socksPort, strongSelf->_socksUsername, strongSelf->_socksPassword);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " connecting to %@:%d via %@:%d using %@:%@]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_socksIp, (int)strongSelf->_socksPort, strongSelf->_socksUsername, strongSelf->_socksPassword);
|
||||
}
|
||||
} else if (strongSelf->_mtpIp != nil) {
|
||||
MTLog(@"[MTTcpConnection#%llx connecting to %@:%d via mtp://%@:%d:%@]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_mtpIp, (int)strongSelf->_mtpPort, strongSelf->_mtpSecret);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " connecting to %@:%d via mtp://%@:%d:%@]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port, strongSelf->_mtpIp, (int)strongSelf->_mtpPort, strongSelf->_mtpSecret);
|
||||
} else {
|
||||
MTLog(@"[MTTcpConnection#%llx connecting to %@:%d]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " connecting to %@:%d]", (intptr_t)strongSelf, strongSelf->_scheme.address.ip, (int)strongSelf->_scheme.address.port);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1280,7 +1280,7 @@ struct ctr_state {
|
||||
_responseTimeoutTimer = nil;
|
||||
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpConnection#%llx response timeout]", (intptr_t)self);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " response timeout]", (intptr_t)self);
|
||||
}
|
||||
[self closeAndNotifyWithError:true];
|
||||
}
|
||||
@ -1421,7 +1421,7 @@ struct ctr_state {
|
||||
|
||||
if (resp.Reply != 0x00) {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"***** %llx %s: socks5 connect failed, error 0x%02x", (intptr_t)self, __PRETTY_FUNCTION__, resp.Reply);
|
||||
MTLog(@"***** " PRIxPTR " %s: socks5 connect failed, error 0x%02x", (intptr_t)self, __PRETTY_FUNCTION__, resp.Reply);
|
||||
}
|
||||
[self closeAndNotifyWithError:true];
|
||||
return;
|
||||
@ -1772,7 +1772,7 @@ struct ctr_state {
|
||||
} else {
|
||||
if (length > 16 * 1024 * 1024) {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpConnection#%llx received invalid length %d]", (intptr_t)self, length);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " received invalid length %d]", (intptr_t)self, length);
|
||||
}
|
||||
[self closeAndNotifyWithError:true];
|
||||
} else {
|
||||
@ -1848,7 +1848,7 @@ struct ctr_state {
|
||||
}
|
||||
} else if (header == 0 && packetData.length < 16) {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpConnection#%llx received nop packet]", (intptr_t)self);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " received nop packet]", (intptr_t)self);
|
||||
}
|
||||
ignorePacket = true;
|
||||
}
|
||||
@ -1907,12 +1907,12 @@ struct ctr_state {
|
||||
{
|
||||
if (error != nil) {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpConnection#%llx disconnected from %@ (%@)]", (intptr_t)self, _scheme.address.ip, error);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " disconnected from %@ (%@)]", (intptr_t)self, _scheme.address.ip, error);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpConnection#%llx disconnected from %@]", (intptr_t)self, _scheme.address.ip);
|
||||
MTLog(@"[MTTcpConnection#%" PRIxPTR " disconnected from %@]", (intptr_t)self, _scheme.address.ip);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ static const NSTimeInterval MTTcpTransportSleepWatchdogTimeout = 60.0;
|
||||
if (!transportContext.didSendActualizationPingAfterConnection)
|
||||
{
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpTransport#%llx unlocking transaction processing due to connection context update task]", (intptr_t)self);
|
||||
MTLog(@"[MTTcpTransport#%" PRIxPTR " unlocking transaction processing due to connection context update task]", (intptr_t)self);
|
||||
}
|
||||
transportContext.isWaitingForTransactionToBecomeReady = false;
|
||||
transportContext.transactionLockTime = 0.0;
|
||||
@ -581,7 +581,7 @@ static const NSTimeInterval MTTcpTransportSleepWatchdogTimeout = 60.0;
|
||||
else if (CFAbsoluteTimeGetCurrent() > transportContext.transactionLockTime + 1.0)
|
||||
{
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpTransport#%llx unlocking transaction processing due to timeout]", (intptr_t)self);
|
||||
MTLog(@"[MTTcpTransport#%" PRIxPTR " unlocking transaction processing due to timeout]", (intptr_t)self);
|
||||
}
|
||||
transportContext.isWaitingForTransactionToBecomeReady = false;
|
||||
transportContext.transactionLockTime = 0.0;
|
||||
@ -589,7 +589,7 @@ static const NSTimeInterval MTTcpTransportSleepWatchdogTimeout = 60.0;
|
||||
else
|
||||
{
|
||||
if (MTLogEnabled()) {
|
||||
MTLog(@"[MTTcpTransport#%llx skipping transaction request]", (intptr_t)self);
|
||||
MTLog(@"[MTTcpTransport#%" PRIxPTR " skipping transaction request]", (intptr_t)self);
|
||||
}
|
||||
transportContext.requestAnotherTransactionWhenReady = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user