1
0
Fork 0

slightly changed return values in TRI_ExtractShapedJsonVocShaper

This commit is contained in:
Jan Steemann 2014-06-05 22:07:47 +02:00
parent 6344bb5a1e
commit 797ef2e2ca
1 changed files with 11 additions and 9 deletions

View File

@ -908,13 +908,23 @@ bool TRI_ExtractShapedJsonVocShaper (TRI_shaper_t* shaper,
return false;
}
if (sid != 0 && sid != accessor->_resultSid) {
LOG_TRACE("expecting sid %lu for path %lu, got sid %lu",
(unsigned long) sid,
(unsigned long) pid,
(unsigned long) accessor->_resultSid);
return false;
}
if (accessor->_resultSid == 0) {
LOG_TRACE("expecting any object for path %lu, got nothing",
(unsigned long) pid);
return sid == 0;
return false;
}
*shape = shaper->lookupShapeId(shaper, accessor->_resultSid);
if (*shape == nullptr) {
@ -923,14 +933,6 @@ bool TRI_ExtractShapedJsonVocShaper (TRI_shaper_t* shaper,
(unsigned long) accessor->_resultSid);
return sid == 0;
}
if (sid != 0 && sid != accessor->_resultSid) {
LOG_TRACE("expecting sid %lu for path %lu, got sid %lu",
(unsigned long) sid,
(unsigned long) pid,
(unsigned long) accessor->_resultSid);
return false;
}