MT#62181 rename uint128ToStr to int2str

Adds another overload

Change-Id: Id873959e1850533674e95dc6ddf2479031779220
mr26.0
Richard Fuchs 6 months ago
parent 5810370c1d
commit df772840b3

@ -1912,7 +1912,7 @@ void CallLeg::createResumeRequest(AmSdp &sdp)
* be good enough for unholding (might be held already with zero conncetions) */
/* keep sessV incremented each time sending SDP offer (hold/resume) */
non_hold_sdp.origin.sessV++;
ILOG_DLG(L_DBG, "Increasing session version in SDP origin line to %s", uint128ToStr(non_hold_sdp.origin.sessV).c_str());
ILOG_DLG(L_DBG, "Increasing session version in SDP origin line to %s", int2str(non_hold_sdp.origin.sessV).c_str());
if (!non_hold_sdp.media.empty()) {
sdp = non_hold_sdp;

@ -2051,7 +2051,7 @@ void SBCCallLeg::createHoldRequest(AmSdp &sdp)
} else {
/* increase sessV */
sdp.origin.sessV++;
ILOG_DLG(L_DBG, "Increasing session version in SDP origin line to %s", uint128ToStr(sdp.origin.sessV).c_str());
ILOG_DLG(L_DBG, "Increasing session version in SDP origin line to %s", int2str(sdp.origin.sessV).c_str());
}
AmB2BMedia *ms = getMediaSession();

@ -766,7 +766,7 @@ void AmB2BSession::saveLocalSdpOrigin(const AmSdp& sdp)
previous_origin_sessId = sdp.origin.sessId;
previous_origin_sessV = sdp.origin.sessV;
ILOG_DLG(L_DBG, "Remembering initial SDP Origin (Id %s V %s)\n",
uint128ToStr(sdp.origin.sessId).c_str(), uint128ToStr(sdp.origin.sessV).c_str());
int2str(sdp.origin.sessId).c_str(), int2str(sdp.origin.sessV).c_str());
}
}
@ -806,10 +806,10 @@ void AmB2BSession::updateLocalSdpOrigin(AmSdp& sdp) {
// remember the current SDP for the next time
previous_sdp = sdp;
ILOG_DLG(L_DBG, "SDP changed; updating Origin (Id %s V %s)\n",
uint128ToStr(sdp.origin.sessId).c_str(), uint128ToStr(sdp.origin.sessV).c_str());
int2str(sdp.origin.sessId).c_str(), int2str(sdp.origin.sessV).c_str());
} else {
ILOG_DLG(L_DBG, "SDP unchanged; keeping Origin (Id %s V %s)\n",
uint128ToStr(sdp.origin.sessId).c_str(), uint128ToStr(sdp.origin.sessV).c_str());
int2str(sdp.origin.sessId).c_str(), int2str(sdp.origin.sessV).c_str());
}
}
}

@ -470,7 +470,7 @@ int AmOfferAnswer::onReplyOut(AmSipReply& reply, int &flags, AmMimeBody &ret_bod
force_no_sdp_update = (sdp_local.origin.sessV == parser_sdp.origin.sessV);
if (force_no_sdp_update)
ILOG_DLG(L_DBG, "Forcing no OA state update (no SDP changes, same session version: was <%s>, now is <%s>).\n",
uint128ToStr(sdp_local.origin.sessV).c_str(), uint128ToStr(parser_sdp.origin.sessV).c_str());
int2str(sdp_local.origin.sessV).c_str(), int2str(parser_sdp.origin.sessV).c_str());
}
}

@ -523,8 +523,8 @@ string SdpIceCandidate::print() const
void AmSdp::print(string& body) const
{
string out_buf = "v="+int2str(version)+"\r\n"
"o="+origin.user+" "+uint128ToStr(origin.sessId)+" "+
uint128ToStr(origin.sessV)+" IN ";
"o="+origin.user+" "+int2str(origin.sessId)+" "+
int2str(origin.sessV)+" IN ";
if (!origin.conn.address.empty())
if (origin.conn.address.find(".") != std::string::npos)

@ -92,7 +92,7 @@ string num2str(T i) {
return string(&buf[pos], maxlen - pos);
}
string uint128ToStr(__uint128_t val) { return num2str<__uint128_t>(val); }
string int2str(__uint128_t val) { return num2str<__uint128_t>(val); }
string int2str(unsigned long long val) { return num2str<unsigned long long>(val); }
string int2str(unsigned int val) { return num2str<unsigned int>(val); }
string int2str(int val) { return num2str<int>(val); }

@ -62,7 +62,7 @@ typedef unsigned char HASHHEX[HASHHEXLEN+1];
/**
* Convert an unsigned int128 to a string.
*/
string uint128ToStr(__uint128_t val);
string int2str(__uint128_t val);
/**
* Convert an int to a string.

Loading…
Cancel
Save