MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / parseV

Method parseV

SMS/SMSMessages.cpp:190–203  ·  view source on GitHub ↗

called from SMS::parseSMS.

Source from the content-addressed store, hash-verified

188
189// called from SMS::parseSMS.
190void CPUserData::parseV(const L3Frame& src, size_t &rp, size_t expectedLength)
191{
192 unsigned numBits = expectedLength*8;
193 // WARNING: segmentCopyTo does not modify the size of the target so we must do it.
194 mRPDU.resize(numBits);
195 int actualLength = (int) src.size() - rp;
196 if (actualLength < (int)numBits) {
197 // The length field (third byte) in the L3Frame was bogus, less than the remaining length of the frame.
198 LOG(ERR)<<"Invalid SMS frame:"<<LOGVAR(expectedLength*8) <<" (from L3 header)"<<LOGVAR(actualLength);
199 L3_READ_ERROR;
200 }
201 src.segmentCopyTo(mRPDU,rp,numBits);
202 rp += numBits;
203}
204
205void CPUserData::writeV(L3Frame& dest, size_t &wp) const
206{

Callers 1

parseMethod · 0.45

Calls 2

sizeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected