fast simplification of code in pqistreamer, and added a missing =null in p3service that could cause a bug

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-04-08 20:57:16 +00:00
parent 8f0793f071
commit 05ed2bec88
2 changed files with 5 additions and 5 deletions

View File

@ -188,13 +188,12 @@ RsItem *pqistreamer::GetItem()
pqioutput(PQL_DEBUG_ALL, pqistreamerzone, out.str());
}
std::list<RsItem *>::iterator it;
if(incoming.empty())
return NULL;
it = incoming.begin();
if (it == incoming.end()) { return NULL; }
RsItem *osr = incoming.front() ;
incoming.pop_front() ;
RsItem *osr = (*it);
incoming.erase(it);
return osr;
}

View File

@ -110,6 +110,7 @@ int p3Service::receive(RsRawItem *raw)
std::cerr << std::endl;
#endif
delete item;
item=NULL ;
}
}