void timerStop(IntervalTimer * itimer) { if (itimer == NULL) return; EventTimer *timer = (EventTimer *)(itimer->data); timer->stop(timer); }
void Session::sendAcks(const QList<qint64> &msgIds) { // verify that socket is connected. Don't send acks if state is other than connected. // In case the socket is not connected, pending acks will be sent when socket is // connected back again. if (state() != QAbstractSocket::ConnectedState) { return; } OutboundPkt p(mSettings); p.appendInt(TL_MsgsAck); p.appendInt(CoreTypes::typeVector); int n = msgIds.length(); p.appendInt(n); Q_FOREACH (qint64 msgId, msgIds) { p.appendLong(msgId); qCDebug(TG_CORE_SESSION) << "Ack for msgId" << msgId; EventTimer* t = m_pendingAcks.take(msgId); if (t) { t->stop(); delete t; } }