Corrected handling and messaging about empty packets in DTSC::Packet::reinit.
This commit is contained in:
parent
9554263e2f
commit
306c896bea
1 changed files with 3 additions and 3 deletions
|
@ -132,12 +132,12 @@ namespace DTSC {
|
||||||
///\param len The length of the data pointed to by data_
|
///\param len The length of the data pointed to by data_
|
||||||
///\param noCopy Determines whether to make a copy or not
|
///\param noCopy Determines whether to make a copy or not
|
||||||
void Packet::reInit(const char * data_, unsigned int len, bool noCopy) {
|
void Packet::reInit(const char * data_, unsigned int len, bool noCopy) {
|
||||||
if (!len){
|
if (!data_) {
|
||||||
|
DEBUG_MSG(DLVL_DEVEL, "ReInit received a null pointer with len %d, ignoring", len);
|
||||||
null();
|
null();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!data_) {
|
if (!data_[0] && !data_[1] && !data_[2] && !data_[3]){
|
||||||
DEBUG_MSG(DLVL_DEVEL, "ReInit received a null pointer with len %d, ignoring", len);
|
|
||||||
null();
|
null();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue