if(db.getSize() < Message::HeaderLength)
throw anna::RuntimeException("Not enough bytes to cover command header length", ANNA_FILE_LOCATION);
- anna::DataBlock avpsDB(db.getData() + Message::HeaderLength, db.getSize() - Message::HeaderLength);
+ //anna::DataBlock avpsDB(db.getData() + Message::HeaderLength, db.getSize() - Message::HeaderLength);
+ const char *avpsDB = db.getData() + Message::HeaderLength;
+ int avpsLen = db.getSize() - Message::HeaderLength;
std::string result = "";
bool found = false;
int pos = 1; // first avp
std::string _dataG /* grouped */, _data;
while(!found) {
- subscriptionIdPtr = anna::diameter::codec::functions::findAVP(avpsDB, AVPID__SCAP_Subscription_Id, pos);
+ //subscriptionIdPtr = anna::diameter::codec::functions::findAVP(avpsDB, AVPID__SCAP_Subscription_Id, pos);
+ subscriptionIdPtr = anna::diameter::codec::functions::findAVP(avpsDB, avpsLen, AVPID__SCAP_Subscription_Id, pos);
if(!subscriptionIdPtr) return result;