diff options
author | Sylvain Miermont <smiermont@semtech.com> | 2013-11-22 17:08:59 +0100 |
---|---|---|
committer | Sylvain Miermont <smiermont@semtech.com> | 2013-11-22 17:08:59 +0100 |
commit | 0d3fcabc3616d95f9fbeeb367087926dcdb32ca1 (patch) | |
tree | 7769a5bb9217a49e67145ae47cc993bfcdb01891 /loragw_pkt_logger/src/parson.c | |
parent | b9710cd6fa8195e442f8bbce53364a125c9198ad (diff) | |
download | lora_gateway-0d3fcabc3616d95f9fbeeb367087926dcdb32ca1.tar.gz lora_gateway-0d3fcabc3616d95f9fbeeb367087926dcdb32ca1.tar.bz2 lora_gateway-0d3fcabc3616d95f9fbeeb367087926dcdb32ca1.zip |
v1.1.0v1.1.0
- Fixed bug 'no TX on radio B' (rfch 1)
- Added feature: concentrator processing delay compensation in the receive() function for accurate 'end of packet' even timestamping
- Added feature: TX 'start delay' compensation in the send() function to emit packet exactly on target timestamp
- Added feature: timestamp counter verification in send() function, return an error if scheduling was too late
- Switched license to 'Revised BSD'
Diffstat (limited to 'loragw_pkt_logger/src/parson.c')
-rw-r--r-- | loragw_pkt_logger/src/parson.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loragw_pkt_logger/src/parson.c b/loragw_pkt_logger/src/parson.c index 54eae2c..b273ba1 100644 --- a/loragw_pkt_logger/src/parson.c +++ b/loragw_pkt_logger/src/parson.c @@ -500,7 +500,9 @@ JSON_Value * json_parse_file(const char *filename) { rewind(fp); file_contents = (char*)parson_malloc(sizeof(char) * (file_size + 1)); if (!file_contents) { fclose(fp); return NULL; } - if (fread(file_contents, file_size, 1, fp) < 1) { fclose(fp); return NULL; } + if (fread(file_contents, file_size, 1, fp) < 1) { + if (ferror(fp)) { fclose(fp); return NULL; } + } fclose(fp); file_contents[file_size] = '\0'; output_value = json_parse_string(file_contents); |