X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fhelpers%2Fericsson%2Ffunctions.cpp;h=9c656816eae6404d36fb1c5b5fab44429bca8054;hb=eb446c670d53aa275d78b366ef1faf2b32ca964e;hp=77b899a0bfdf73ac9a92949462203b8a98cd3828;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/diameter/helpers/ericsson/functions.cpp b/source/diameter/helpers/ericsson/functions.cpp index 77b899a..9c65681 100644 --- a/source/diameter/helpers/ericsson/functions.cpp +++ b/source/diameter/helpers/ericsson/functions.cpp @@ -29,13 +29,14 @@ std::string anna::diameter::helpers::ericsson::functions::getSCAPSubscriptionIdD 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 const char * subscriptionIdPtr; const char * subscriptionIdDataPtr; - int type; // Decoded avp information: AvpId _id; char _flags; @@ -43,7 +44,8 @@ std::string anna::diameter::helpers::ericsson::functions::getSCAPSubscriptionIdD 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;