aboutsummaryrefslogtreecommitdiff
path: root/apps/systemlib
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-10-08 22:37:18 -0700
committerpx4dev <px4@purgatory.org>2012-10-08 22:37:18 -0700
commita2ab5e8691d55a1c98f76ca05c325aad85e2e542 (patch)
tree193f13dc405efd7d4f560b0bce19a7022d700c47 /apps/systemlib
parenta29e8e00fa09b7a40c20e5add3fd53002dc06fe0 (diff)
downloadpx4-firmware-a2ab5e8691d55a1c98f76ca05c325aad85e2e542.tar.gz
px4-firmware-a2ab5e8691d55a1c98f76ca05c325aad85e2e542.tar.bz2
px4-firmware-a2ab5e8691d55a1c98f76ca05c325aad85e2e542.zip
Don't treat end-of-document-structure as an error.
Diffstat (limited to 'apps/systemlib')
-rw-r--r--apps/systemlib/bson/tinybson.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/systemlib/bson/tinybson.c b/apps/systemlib/bson/tinybson.c
index 46ced013d..10b736fd6 100644
--- a/apps/systemlib/bson/tinybson.c
+++ b/apps/systemlib/bson/tinybson.c
@@ -106,7 +106,9 @@ bson_decoder_next(bson_decoder_t decoder)
/* if the nesting level is now zero, the top-level document is done */
if (decoder->nesting == 0) {
- CODER_KILL(decoder, "nesting is zero, document is done");
+ /* like kill but not an error */
+ debug("nesting is zero, document is done");
+ decoder->fd = -1;
/* return end-of-file to the caller */
return 0;