mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -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
2 changed files with 5 additions and 5 deletions
|
@ -188,13 +188,12 @@ RsItem *pqistreamer::GetItem()
|
||||||
pqioutput(PQL_DEBUG_ALL, pqistreamerzone, out.str());
|
pqioutput(PQL_DEBUG_ALL, pqistreamerzone, out.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<RsItem *>::iterator it;
|
if(incoming.empty())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
it = incoming.begin();
|
RsItem *osr = incoming.front() ;
|
||||||
if (it == incoming.end()) { return NULL; }
|
incoming.pop_front() ;
|
||||||
|
|
||||||
RsItem *osr = (*it);
|
|
||||||
incoming.erase(it);
|
|
||||||
return osr;
|
return osr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ int p3Service::receive(RsRawItem *raw)
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
delete item;
|
delete item;
|
||||||
|
item=NULL ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue