mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
8f0793f071
commit
05ed2bec88
@ -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;
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ int p3Service::receive(RsRawItem *raw)
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
delete item;
|
||||
item=NULL ;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user