--- a/src/Common/SDU.cc
+++ b/src/Common/SDU.cc
@@ -35,7 +35,7 @@
mUserDataType::const_iterator it;
for(it = other.mUserData_var.begin(); it != other.mUserData_var.end(); ++it){
- CDAPMessage *cdap = (*it)->dup();
+ cPacket *cdap = (*it)->dup();
take(cdap);
mUserData_var.push_back(cdap);
@@ -110,7 +110,7 @@
// this->userData = userData;
}
-bool SDU::addUserData(CDAPMessage* msg){
+bool SDU::addUserData(cPacket* msg){
// if(msg->getSize() > MAXSDUSIZE){
// return false;
@@ -119,16 +119,16 @@
//TODO A1 check current SDU size
take(msg);
this->mUserData_var.push_back(msg);
- size_var += msg->getSize();
+ size_var += msg->getByteLength();
return true;
}
-CDAPMessage* SDU::getUserData(){
+cPacket* SDU::getUserData(){
if (!mUserData_var.empty())
{
- CDAPMessage* cdap;
+ cPacket* cdap;
cdap = mUserData_var.front();
mUserData_var.erase(mUserData_var.begin());
@@ -180,7 +180,7 @@
SDU::~SDU()
{
- std::vector<CDAPMessage*>::iterator it;
+ std::vector<cPacket*>::iterator it;
for(it = mUserData_var.begin(); it != mUserData_var.end();){
if((*it) != NULL){
drop((*it));