From 0d3fcabc3616d95f9fbeeb367087926dcdb32ca1 Mon Sep 17 00:00:00 2001 From: Sylvain Miermont Date: Fri, 22 Nov 2013 17:08:59 +0100 Subject: v1.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' --- loragw_pkt_logger/LICENSE.TXT | 36 ++++++++++++++++++++++--------- loragw_pkt_logger/src/loragw_pkt_logger.c | 3 +++ loragw_pkt_logger/src/parson.c | 4 +++- 3 files changed, 32 insertions(+), 11 deletions(-) (limited to 'loragw_pkt_logger') diff --git a/loragw_pkt_logger/LICENSE.TXT b/loragw_pkt_logger/LICENSE.TXT index b46b1f5..2007c51 100644 --- a/loragw_pkt_logger/LICENSE.TXT +++ b/loragw_pkt_logger/LICENSE.TXT @@ -1,4 +1,4 @@ - --- For the parson library (parson.c and parson.h) --- +--- For the parson library (parson.c and parson.h) --- Parson ( http://kgabis.github.com/parson/ ) Copyright (c) 2012 Krzysztof Gabis @@ -21,13 +21,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- For the rest of the code --- - -Copyright (C) 2013 SEMTECH S.A. + --- For the rest of the code : Revised BSD License --- + +Copyright (c) 2013, SEMTECH S.A. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Semtech corporation nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - THE FOLLOWING SOFTWARE IS PROVIDED: (1) "AS IS" WITH NO WARRANTY; AND -(2)TO ENABLE ACCESS TO CODING INFORMATION TO GUIDE AND FACILITATE CUSTOMER. -CONSEQUENTLY, SEMTECH SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR -CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT -OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION -CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/loragw_pkt_logger/src/loragw_pkt_logger.c b/loragw_pkt_logger/src/loragw_pkt_logger.c index b3200ba..f5f6b30 100644 --- a/loragw_pkt_logger/src/loragw_pkt_logger.c +++ b/loragw_pkt_logger/src/loragw_pkt_logger.c @@ -8,6 +8,9 @@ Description: Configure Lora concentrator and record received packets in a log file + +License: Revised BSD License, see LICENSE.TXT file include in the project +Maintainer: Sylvain Miermont */ 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); -- cgit v1.2.3