DTSC packet re-init verbosity tweak
This commit is contained in:
parent
1bf574acb8
commit
9e9550f2b7
1 changed files with 7 additions and 3 deletions
|
@ -22,7 +22,11 @@ namespace DTSC {
|
|||
master = false;
|
||||
bufferLen = 0;
|
||||
data = NULL;
|
||||
if (rhs.data && rhs.dataLen){
|
||||
reInit(rhs.data, rhs.dataLen, !rhs.master);
|
||||
}else{
|
||||
null();
|
||||
}
|
||||
}
|
||||
|
||||
/// Data constructor for packets, either references or copies a packet from raw data.
|
||||
|
@ -46,7 +50,7 @@ namespace DTSC {
|
|||
if (master && !rhs.master) {
|
||||
null();
|
||||
}
|
||||
if (rhs) {
|
||||
if (rhs && rhs.data && rhs.dataLen) {
|
||||
reInit(rhs.data, rhs.dataLen, !rhs.master);
|
||||
} else {
|
||||
null();
|
||||
|
@ -141,7 +145,7 @@ namespace DTSC {
|
|||
///\param noCopy Determines whether to make a copy or not
|
||||
void Packet::reInit(const char * data_, unsigned int len, bool noCopy) {
|
||||
if (!data_) {
|
||||
HIGH_MSG("ReInit received a null pointer with len %d, ignoring", len);
|
||||
WARN_MSG("ReInit received a null pointer with len %d, nulling", len);
|
||||
null();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue