Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libmodbus for openSUSE:Factory checked in at 2022-02-04 21:49:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libmodbus (Old) and /work/SRC/openSUSE:Factory/.libmodbus.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmodbus" Fri Feb 4 21:49:20 2022 rev:2 rq:951503 version:3.1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/libmodbus/libmodbus.changes 2020-12-03 18:43:22.998209569 +0100 +++ /work/SRC/openSUSE:Factory/.libmodbus.new.1898/libmodbus.changes 2022-02-04 21:52:35.399071765 +0100 @@ -1,0 +2,8 @@ +Thu Feb 3 22:27:20 UTC 2022 - Stanislav Brabec <[email protected]> + +- Update to version 3.1.7: + * Many minor fixes, typo fixes and documentation enhancements. + * For more see NEWS. +- Properly build debug package. + +------------------------------------------------------------------- Old: ---- libmodbus-3.1.6.tar.gz New: ---- libmodbus-3.1.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libmodbus.spec ++++++ --- /var/tmp/diff_new_pack.0ttFtN/_old 2022-02-04 21:52:35.811068931 +0100 +++ /var/tmp/diff_new_pack.0ttFtN/_new 2022-02-04 21:52:35.815068903 +0100 @@ -1,7 +1,7 @@ # # spec file for package libmodbus # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,16 +12,16 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: libmodbus -Url: https://www.libmodbus.org/ +URL: https://www.libmodbus.org/ Summary: Modbus Library -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ -Version: 3.1.6 +Version: 3.1.7 Release: 0 # WARNING: tarballs from GitHub are different! Source: http://libmodbus.org/releases/%{name}-%{version}.tar.gz @@ -68,16 +68,17 @@ %setup -q %build +export CFLAGS="%{optflags}" %configure\ --docdir=%{_docdir}/%{name}\ --disable-static -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 %install %make_install rm %{buildroot}%{_libdir}/*.la # Installed by %%doc -rm %{buildroot}%{_docdir}/%{name}/{MIGRATION,README.md} +rm %{buildroot}%{_docdir}/%{name}/{AUTHORS,MIGRATION,NEWS,README.md} %post -n libmodbus5 -p /sbin/ldconfig ++++++ libmodbus-3.1.6.tar.gz -> libmodbus-3.1.7.tar.gz ++++++ ++++ 19521 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/MIGRATION new/libmodbus-3.1.7/MIGRATION --- old/libmodbus-3.1.6/MIGRATION 2017-10-26 13:38:06.796261099 +0200 +++ new/libmodbus-3.1.7/MIGRATION 2021-05-11 00:55:51.703624711 +0200 @@ -16,7 +16,7 @@ - all function and constants are respectively prefixed by modbus_ or MODBUS_. -- the POSIX error conventions are used (if an error occured, -1 or NULL is +- the POSIX error conventions are used (if an error occurred, -1 or NULL is returned and errno is set accordingly). - coil status and discretes inputs are just bits and force/preset actions have diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/Makefile.am new/libmodbus-3.1.7/Makefile.am --- old/libmodbus-3.1.6/Makefile.am 2019-07-31 23:38:15.736436854 +0200 +++ new/libmodbus-3.1.7/Makefile.am 2021-05-11 00:41:40.605034924 +0200 @@ -7,7 +7,7 @@ EXTRA_DIST = libmodbus.pc.in CLEANFILES += libmodbus.pc -dist_doc_DATA = MIGRATION README.md +dist_doc_DATA = MIGRATION README.md AUTHORS NEWS SUBDIRS = src doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/NEWS new/libmodbus-3.1.7/NEWS --- old/libmodbus-3.1.6/NEWS 2019-07-31 23:38:15.739770194 +0200 +++ new/libmodbus-3.1.7/NEWS 2022-01-09 00:22:12.717576547 +0100 @@ -1,3 +1,29 @@ +libmodbus 3.1.7 (2022-01-09) +============================ + +- modbus_reply: fix copy & paste error in sanity check (fixes #614) +- Add SECURITY.md (closes #613) +- Fix typo in comment (closes #588) +- Replace obsolete AC_PROG_CC_STDC by AC_PROG_CC +- Fix position of CC flags in documentation (closes #599) +- Remove duplicate ';' (closes #602) +- Add the baud rate of 256k for Windows (closes #603) +- cosmetic changes in man page standardizing itemization +- Fix many typos +- Replace .dir-locals.el (Emacs) by .editorconfig +- Include the test LICENSE in tarball +- Install the NEWS and AUTHORS files +- Update README.md +- docs: fix simple typo, reponse -> response +- Add modbus_[get|set]_indication_timeout to doc build +- Fix warning issues +- Move malloc before starting unit tests +- Fixed MODBUS_GET_* macros in case of negative values +- SPDX: change LGPL-2.1+ to LGPL-2.1-or-later + +Thank you to @yegorich, @i-ky, @jobol, @timgates42, @anton-bondarev, +@richardash1981, @stefannilsson, @Zugschlus, @qqq89513 and @mhei. + libmodbus 3.1.6 (2019-07-31) ============================ @@ -423,7 +449,7 @@ - Fix report slave ID request Patch (bzr) provided by Paul Fertser. - Fix #425604 - Conditional jump or move depends on uninitialised value(s) - Occurs on first occurence of slave timeout. + Occurs on first occurrence of slave timeout. Reported by Henrik Munktell. - Fix #457200 - FreeBSD support Patch provided by Norbert Koch. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/README.md new/libmodbus-3.1.7/README.md --- old/libmodbus-3.1.6/README.md 2019-07-31 23:38:15.739770194 +0200 +++ new/libmodbus-3.1.7/README.md 2021-05-11 00:41:40.605034924 +0200 @@ -23,9 +23,11 @@ The official website is [www.libmodbus.org](http://www.libmodbus.org). -The library is written in C and designed to run on Linux, Mac OS X, FreeBSD and +The library is written in C and designed to run on Linux, Mac OS X, FreeBSD, Embox, QNX and Windows. +You can use the library on MCUs with Embox RTOS. + Installation ------------ @@ -55,6 +57,8 @@ will need to install the following dependencies first: `brew install autoconf automake libtool`. +To build under Embox, you have to use its build system. + Documentation ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/build-aux/compile new/libmodbus-3.1.7/build-aux/compile --- old/libmodbus-3.1.6/build-aux/compile 2018-09-18 15:06:54.000000000 +0200 +++ new/libmodbus-3.1.7/build-aux/compile 2021-10-04 21:45:02.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/build-aux/missing new/libmodbus-3.1.7/build-aux/missing --- old/libmodbus-3.1.6/build-aux/missing 2018-09-18 15:06:54.000000000 +0200 +++ new/libmodbus-3.1.7/build-aux/missing 2021-10-04 21:45:02.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/build-aux/test-driver new/libmodbus-3.1.7/build-aux/test-driver --- old/libmodbus-3.1.6/build-aux/test-driver 2018-09-18 15:06:54.000000000 +0200 +++ new/libmodbus-3.1.7/build-aux/test-driver 2021-10-04 21:45:02.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] + test-driver --test-name NAME --log-file PATH --trs-file PATH + [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/config.h.in new/libmodbus-3.1.7/config.h.in --- old/libmodbus-3.1.6/config.h.in 2019-07-31 23:38:45.449833870 +0200 +++ new/libmodbus-3.1.7/config.h.in 2022-01-10 21:35:27.098761559 +0100 @@ -48,8 +48,8 @@ /* Define to 1 if you have the <linux/serial.h> header file. */ #undef HAVE_LINUX_SERIAL_H -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the <minix/config.h> header file. */ +#undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H @@ -69,6 +69,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -111,6 +114,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <wchar.h> header file. */ +#undef HAVE_WCHAR_H + /* Define to 1 if you have the <winsock2.h> header file. */ #undef HAVE_WINSOCK2_H @@ -138,28 +144,96 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE #endif @@ -169,27 +243,12 @@ /* _ */ #undef WINVER -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/configure.ac new/libmodbus-3.1.7/configure.ac --- old/libmodbus-3.1.6/configure.ac 2019-07-31 23:38:15.739770194 +0200 +++ new/libmodbus-3.1.7/configure.ac 2022-01-09 00:15:37.706828184 +0100 @@ -13,7 +13,7 @@ # m4_define([libmodbus_version_major], [3]) m4_define([libmodbus_version_minor], [1]) -m4_define([libmodbus_version_micro], [6]) +m4_define([libmodbus_version_micro], [7]) m4_define([libmodbus_release_status], [m4_if(m4_eval(libmodbus_version_minor % 2), [1], [snapshot], [release])]) @@ -30,7 +30,7 @@ AC_CONFIG_SRCDIR([src/modbus.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects]) -AC_PROG_CC_STDC +AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/Makefile.am new/libmodbus-3.1.7/doc/Makefile.am --- old/libmodbus-3.1.6/doc/Makefile.am 2019-07-31 23:38:15.739770194 +0200 +++ new/libmodbus-3.1.7/doc/Makefile.am 2021-10-06 14:28:18.271593169 +0200 @@ -3,6 +3,8 @@ modbus_connect.txt \ modbus_flush.txt \ modbus_free.txt \ + modbus_get_indication_timeout.txt \ + modbus_get_slave.txt \ modbus_get_byte_from_bits.txt \ modbus_get_byte_timeout.txt \ modbus_get_float.txt \ @@ -12,7 +14,6 @@ modbus_get_float_dcba.txt \ modbus_get_header_length.txt \ modbus_get_response_timeout.txt \ - modbus_get_slave.txt \ modbus_get_socket.txt \ modbus_mapping_free.txt \ modbus_mapping_new.txt \ @@ -48,6 +49,7 @@ modbus_set_float_badc.txt \ modbus_set_float_cdab.txt \ modbus_set_float_dcba.txt \ + modbus_set_indication_timeout.txt \ modbus_set_response_timeout.txt \ modbus_set_slave.txt \ modbus_set_socket.txt \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/libmodbus.txt new/libmodbus-3.1.7/doc/libmodbus.txt --- old/libmodbus-3.1.6/doc/libmodbus.txt 2019-07-31 23:38:15.739770194 +0200 +++ new/libmodbus-3.1.7/doc/libmodbus.txt 2021-10-18 15:29:08.073987910 +0200 @@ -11,8 +11,7 @@ -------- *#include <modbus.h>* -*cc* \`pkg-config --cflags --libs libmodbus` 'files' - +*cc* 'files' \`pkg-config --cflags --libs libmodbus` DESCRIPTION ----------- @@ -72,17 +71,17 @@ is not responding). Create a Modbus RTU context:: - linkmb:modbus_new_rtu[3] + - linkmb:modbus_new_rtu[3] Set the serial mode:: - linkmb:modbus_rtu_get_serial_mode[3] - linkmb:modbus_rtu_set_serial_mode[3] - linkmb:modbus_rtu_get_rts[3] - linkmb:modbus_rtu_set_rts[3] - linkmb:modbus_rtu_set_custom_rts[3] - linkmb:modbus_rtu_get_rts_delay[3] - linkmb:modbus_rtu_set_rts_delay[3] + - linkmb:modbus_rtu_get_serial_mode[3] + - linkmb:modbus_rtu_set_serial_mode[3] + - linkmb:modbus_rtu_get_rts[3] + - linkmb:modbus_rtu_set_rts[3] + - linkmb:modbus_rtu_set_custom_rts[3] + - linkmb:modbus_rtu_get_rts_delay[3] + - linkmb:modbus_rtu_set_rts_delay[3] TCP (IPv4) Context @@ -92,7 +91,7 @@ takes care of the same. Create a Modbus TCP context:: - linkmb:modbus_new_tcp[3] + - linkmb:modbus_new_tcp[3] TCP PI (IPv4 and IPv6) Context @@ -105,7 +104,7 @@ resolution but it consumes about 1Kb of additional memory. Create a Modbus TCP context:: - linkmb:modbus_new_tcp_pi[3] + - linkmb:modbus_new_tcp_pi[3] Common @@ -115,65 +114,63 @@ are provided to modify and free a 'context': Free libmodbus context:: - linkmb:modbus_free[3] + - linkmb:modbus_free[3] Set slave ID:: - linkmb:modbus_set_slave[3] + - linkmb:modbus_set_slave[3] Enable debug mode:: - linkmb:modbus_set_debug[3] + - linkmb:modbus_set_debug[3] Timeout settings:: - linkmb:modbus_get_byte_timeout[3] - linkmb:modbus_set_byte_timeout[3] - linkmb:modbus_get_response_timeout[3] - linkmb:modbus_set_response_timeout[3] - linkmb:modbus_get_indication_timeout[3] - linkmb:modbus_set_indication_timeout[3] + - linkmb:modbus_get_byte_timeout[3] + - linkmb:modbus_set_byte_timeout[3] + - linkmb:modbus_get_response_timeout[3] + - linkmb:modbus_set_response_timeout[3] Error recovery mode:: - linkmb:modbus_set_error_recovery[3] + - linkmb:modbus_set_error_recovery[3] Setter/getter of internal socket:: - linkmb:modbus_set_socket[3] - linkmb:modbus_get_socket[3] + - linkmb:modbus_set_socket[3] + - linkmb:modbus_get_socket[3] Information about header:: - linkmb:modbus_get_header_length[3] + - linkmb:modbus_get_header_length[3] Macros for data manipulation:: -- MODBUS_GET_HIGH_BYTE(data), extracts the high byte from a byte -- MODBUS_GET_LOW_BYTE(data), extracts the low byte from a byte -- MODBUS_GET_INT64_FROM_INT16(tab_int16, index), builds an int64 from the four - first int16 starting at tab_int16[index] -- MODBUS_GET_INT32_FROM_INT16(tab_int16, index), builds an int32 from the two - first int16 starting at tab_int16[index] -- MODBUS_GET_INT16_FROM_INT8(tab_int8, index), builds an int16 from the two - first int8 starting at tab_int8[index] -- MODBUS_SET_INT16_TO_INT8(tab_int8, index, value), set an int16 value into - the two first bytes starting at tab_int8[index] -- MODBUS_SET_INT32_TO_INT16(tab_int16, index, value), set an int32 value into - the two first int16 starting at tab_int16[index] -- MODBUS_SET_INT64_TO_INT16(tab_int16, index, value), set an int64 value into - the four first int16 starting at tab_int16[index] + - MODBUS_GET_HIGH_BYTE(data), extracts the high byte from a byte + - MODBUS_GET_LOW_BYTE(data), extracts the low byte from a byte + - MODBUS_GET_INT64_FROM_INT16(tab_int16, index), builds an int64 from the four + first int16 starting at tab_int16[index] + - MODBUS_GET_INT32_FROM_INT16(tab_int16, index), builds an int32 from the two + first int16 starting at tab_int16[index] + - MODBUS_GET_INT16_FROM_INT8(tab_int8, index), builds an int16 from the two + first int8 starting at tab_int8[index] + - MODBUS_SET_INT16_TO_INT8(tab_int8, index, value), set an int16 value into + the two first bytes starting at tab_int8[index] + - MODBUS_SET_INT32_TO_INT16(tab_int16, index, value), set an int32 value into + the two first int16 starting at tab_int16[index] + - MODBUS_SET_INT64_TO_INT16(tab_int16, index, value), set an int64 value into + the four first int16 starting at tab_int16[index] Handling of bits and bytes:: - linkmb:modbus_set_bits_from_byte[3] - linkmb:modbus_set_bits_from_bytes[3] - linkmb:modbus_get_byte_from_bits[3] + - linkmb:modbus_set_bits_from_byte[3] + - linkmb:modbus_set_bits_from_bytes[3] + - linkmb:modbus_get_byte_from_bits[3] Set or get float numbers:: - linkmb:modbus_get_float_abcd[3] - linkmb:modbus_set_float_abcd[3] - linkmb:modbus_get_float_badc[3] - linkmb:modbus_set_float_badc[3] - linkmb:modbus_get_float_cdab[3] - linkmb:modbus_set_float_cdab[3] - linkmb:modbus_get_float_dcba[3] - linkmb:modbus_set_float_dcba[3] - linkmb:modbus_get_float[3] (deprecated) - linkmb:modbus_set_float[3] (deprecated) + - linkmb:modbus_get_float_abcd[3] + - linkmb:modbus_set_float_abcd[3] + - linkmb:modbus_get_float_badc[3] + - linkmb:modbus_set_float_badc[3] + - linkmb:modbus_get_float_cdab[3] + - linkmb:modbus_set_float_cdab[3] + - linkmb:modbus_get_float_dcba[3] + - linkmb:modbus_set_float_dcba[3] + - linkmb:modbus_get_float[3] (deprecated) + - linkmb:modbus_set_float[3] (deprecated) @@ -183,13 +180,13 @@ Modbus devices: Establish a connection:: - linkmb:modbus_connect[3] + - linkmb:modbus_connect[3] Close a connection:: - linkmb:modbus_close[3] + - linkmb:modbus_close[3] Flush a connection:: - linkmb:modbus_flush[3] + - linkmb:modbus_flush[3] Client @@ -199,50 +196,45 @@ send Modbus requests: Read data:: - linkmb:modbus_read_bits[3] - linkmb:modbus_read_input_bits[3] - linkmb:modbus_read_registers[3] - linkmb:modbus_read_input_registers[3] - linkmb:modbus_report_slave_id[3] + - linkmb:modbus_read_bits[3] + - linkmb:modbus_read_input_bits[3] + - linkmb:modbus_read_registers[3] + - linkmb:modbus_read_input_registers[3] + - linkmb:modbus_report_slave_id[3] Write data:: - linkmb:modbus_write_bit[3] - linkmb:modbus_write_register[3] - linkmb:modbus_write_bits[3] - linkmb:modbus_write_registers[3] + - linkmb:modbus_write_bit[3] + - linkmb:modbus_write_register[3] + - linkmb:modbus_write_bits[3] + - linkmb:modbus_write_registers[3] Write and read data:: - linkmb:modbus_write_and_read_registers[3] + - linkmb:modbus_write_and_read_registers[3] Raw requests:: - linkmb:modbus_send_raw_request[3] - linkmb:modbus_receive_confirmation[3] + - linkmb:modbus_send_raw_request[3] + - linkmb:modbus_receive_confirmation[3] Reply an exception:: - linkmb:modbus_reply_exception[3] + - linkmb:modbus_reply_exception[3] Server ~~~~~~ The server is waiting for request from clients and must answer when it is -concerned by the request. +concerned by the request. The libmodbus offers the following functions to +handle requests: -In TCP mode, you must not use the usual linkmb:modbus_connect[3] to establish the connection but a pair of accept/listen calls:: - linkmb:modbus_tcp_listen[3] - linkmb:modbus_tcp_accept[3] - linkmb:modbus_tcp_pi_listen[3] - linkmb:modbus_tcp_pi_accept[3] - -then the data can be received with:: - linkmb:modbus_receive[3] - -and a response can be send with:: - linkmb:modbus_reply[3] - linkmb:modbus_reply_exception[3] - -To handle the mapping of your Modbus data, you must use: - linkmb:modbus_mapping_new[3] - linkmb:modbus_mapping_free[3] +Data mapping:: + - linkmb:modbus_mapping_new[3] + - linkmb:modbus_mapping_free[3] + +Receive:: + - linkmb:modbus_receive[3] + +Reply:: + - linkmb:modbus_reply[3] + - linkmb:modbus_reply_exception[3] ERROR HANDLING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_get_indication_timeout.txt new/libmodbus-3.1.7/doc/modbus_get_indication_timeout.txt --- old/libmodbus-3.1.6/doc/modbus_get_indication_timeout.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/libmodbus-3.1.7/doc/modbus_get_indication_timeout.txt 2021-05-11 00:41:40.605034924 +0200 @@ -0,0 +1,53 @@ +modbus_get_indication_timeout(3) +================================ + + +NAME +---- +modbus_get_indication_timeout - get timeout used to wait for an indication (request received by a server). + +SYNOPSIS +-------- +*int modbus_get_indication_timeout(modbus_t *'ctx', uint32_t *'to_sec', uint32_t *'to_usec');* + + +DESCRIPTION +----------- + +The *modbus_get_indication_timeout()* function shall store the timeout interval +used to wait for an indication in the _to_sec_ and _to_usec_ arguments. +Indication is the term used by the Modbus protocol to designate a request +received by the server. + +The default value is zero, it means the server will wait forever. + + +RETURN VALUE +------------ +The function shall return 0 if successful. Otherwise it shall return -1 and set +errno. + + +EXAMPLE +------- +[source,c] +------------------- +uint32_t to_sec; +uint32_t to_usec; + +/* Save original timeout */ +modbus_get_indication_timeout(ctx, &to_sec, &to_usec); +------------------- + + +SEE ALSO +-------- +linkmb:modbus_set_indication_timeout[3] +linkmb:modbus_get_response_timeout[3] +linkmb:modbus_set_response_timeout[3] + + +AUTHORS +------- +The libmodbus documentation was written by St??phane Raimbault +<[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_mapping_new_start_address.txt new/libmodbus-3.1.7/doc/modbus_mapping_new_start_address.txt --- old/libmodbus-3.1.6/doc/modbus_mapping_new_start_address.txt 2019-07-31 23:38:15.766436918 +0200 +++ new/libmodbus-3.1.7/doc/modbus_mapping_new_start_address.txt 2021-05-11 00:55:51.703624711 +0200 @@ -21,9 +21,9 @@ store bits, input bits, registers and inputs registers. The pointers are stored in modbus_mapping_t structure. All values of the arrays are initialized to zero. -The different starting adresses make it possible to place the mapping at any +The different starting addresses make it possible to place the mapping at any address in each address space. This way, you can give access to values stored -at high adresses without allocating memory from the address zero, for eg. to +at high addresses without allocating memory from the address zero, for eg. to make available registers from 10000 to 10009, you can use: [source,c] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_receive_confirmation.txt new/libmodbus-3.1.7/doc/modbus_receive_confirmation.txt --- old/libmodbus-3.1.6/doc/modbus_receive_confirmation.txt 2019-07-31 23:38:15.773103599 +0200 +++ new/libmodbus-3.1.7/doc/modbus_receive_confirmation.txt 2021-05-11 00:55:51.703624711 +0200 @@ -30,7 +30,7 @@ RETURN VALUE ------------ The function shall store the confirmation request in _rsp_ and return the -response length if sucessful. The returned request length can be zero if the +response length if successful. The returned request length can be zero if the indication request is ignored (eg. a query for another slave in RTU mode). Otherwise it shall return -1 and set errno. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_reply.txt new/libmodbus-3.1.7/doc/modbus_reply.txt --- old/libmodbus-3.1.6/doc/modbus_reply.txt 2019-07-31 23:38:15.773103599 +0200 +++ new/libmodbus-3.1.7/doc/modbus_reply.txt 2021-05-11 00:55:51.703624711 +0200 @@ -3,7 +3,7 @@ NAME ---- -modbus_reply - send a reponse to the received request +modbus_reply - send a response to the received request SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_reply_exception.txt new/libmodbus-3.1.7/doc/modbus_reply_exception.txt --- old/libmodbus-3.1.6/doc/modbus_reply_exception.txt 2019-07-31 23:38:15.773103599 +0200 +++ new/libmodbus-3.1.7/doc/modbus_reply_exception.txt 2021-05-11 00:55:51.703624711 +0200 @@ -3,7 +3,7 @@ NAME ---- -modbus_reply_exception - send an exception reponse +modbus_reply_exception - send an exception response SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_set_float_badc.txt new/libmodbus-3.1.7/doc/modbus_set_float_badc.txt --- old/libmodbus-3.1.6/doc/modbus_set_float_badc.txt 2019-07-31 23:38:15.783103621 +0200 +++ new/libmodbus-3.1.7/doc/modbus_set_float_badc.txt 2021-05-11 00:55:51.703624711 +0200 @@ -15,7 +15,7 @@ DESCRIPTION ----------- The *modbus_set_float_badc()* function shall set a float to 4 bytes in swapped -bytes Modbus format (BADC insted of ABCD). The _dest_ array must be pointer on +bytes Modbus format (BADC instead of ABCD). The _dest_ array must be pointer on two 16 bits values to be able to store the full result of the conversion. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/doc/modbus_set_indication_timeout.txt new/libmodbus-3.1.7/doc/modbus_set_indication_timeout.txt --- old/libmodbus-3.1.6/doc/modbus_set_indication_timeout.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/libmodbus-3.1.7/doc/modbus_set_indication_timeout.txt 2021-05-11 00:41:40.605034924 +0200 @@ -0,0 +1,48 @@ +modbus_set_indication_timeout(3) +================================ + + +NAME +---- +modbus_set_indication_timeout - set timeout between indications + + +SYNOPSIS +-------- +*void modbus_set_indication_timeout(modbus_t *'ctx', uint32_t 'to_sec', uint32_t 'to_usec');* + + +DESCRIPTION +----------- +The *modbus_set_indication_timeout()* function shall set the timeout interval used by +a server to wait for a request from a client. + +The value of _to_usec_ argument must be in the range 0 to 999999. + +If both _to_sec_ and _to_usec_ are zero, this timeout will not be used at all. +In this case, the server will wait forever. + + +RETURN VALUE +------------ +The function shall return 0 if successful. Otherwise it shall return -1 and set +errno. + + +ERRORS +------ +*EINVAL*:: +The argument _ctx_ is NULL or _to_usec_ is larger than 1000000. + + +SEE ALSO +-------- +linkmb:modbus_get_indication_timeout[3] +linkmb:modbus_get_response_timeout[3] +linkmb:modbus_set_response_timeout[3] + + +AUTHORS +------- +The libmodbus documentation was written by St??phane Raimbault +<[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/m4/libtool.m4 new/libmodbus-3.1.7/m4/libtool.m4 --- old/libmodbus-3.1.6/m4/libtool.m4 2019-07-21 11:35:30.000000000 +0200 +++ new/libmodbus-3.1.7/m4/libtool.m4 2021-05-13 06:26:57.000000000 +0200 @@ -728,7 +728,6 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/m4/ltversion.m4 new/libmodbus-3.1.7/m4/ltversion.m4 --- old/libmodbus-3.1.6/m4/ltversion.m4 2019-07-21 11:35:30.000000000 +0200 +++ new/libmodbus-3.1.7/m4/ltversion.m4 2021-05-13 06:26:57.000000000 +0200 @@ -12,11 +12,11 @@ # serial 4221 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce]) +m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce-dirty]) m4_define([LT_PACKAGE_REVISION], [2.4.6.42]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6.42-b88ce' +[macro_version='2.4.6.42-b88ce-dirty' macro_revision='2.4.6.42' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-data.c new/libmodbus-3.1.7/src/modbus-data.c --- old/libmodbus-3.1.6/src/modbus-data.c 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-data.c 2021-05-11 00:41:40.605034924 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2010-2014 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdlib.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-private.h new/libmodbus-3.1.7/src/modbus-private.h --- old/libmodbus-3.1.6/src/modbus-private.h 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-private.h 2021-10-06 14:28:18.274926595 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2010-2012 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_PRIVATE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-rtu-private.h new/libmodbus-3.1.7/src/modbus-rtu-private.h --- old/libmodbus-3.1.6/src/modbus-rtu-private.h 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-rtu-private.h 2021-05-11 00:41:40.605034924 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2011 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_RTU_PRIVATE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-rtu.c new/libmodbus-3.1.7/src/modbus-rtu.c --- old/libmodbus-3.1.6/src/modbus-rtu.c 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-rtu.c 2021-10-18 15:24:38.722243264 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2011 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdio.h> @@ -353,7 +353,7 @@ } } -/* The check_crc16 function shall return 0 is the message is ignored and the +/* The check_crc16 function shall return 0 if the message is ignored and the message length if the CRC is valid. Otherwise it shall return -1 and set errno to EMBBADCRC. */ static int _modbus_rtu_check_integrity(modbus_t *ctx, uint8_t *msg, @@ -496,6 +496,9 @@ case 250000: dcb.BaudRate = 250000; break; + case 256000: + dcb.BaudRate = 256000; + break; case 460800: dcb.BaudRate = 460800; break; @@ -842,7 +845,7 @@ ONCLR ant others needs OPOST to be enabled */ - /* Raw ouput */ + /* Raw output */ tios.c_oflag &=~ OPOST; /* C_CC Control characters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-rtu.h new/libmodbus-3.1.7/src/modbus-rtu.h --- old/libmodbus-3.1.6/src/modbus-rtu.h 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-rtu.h 2021-05-11 00:41:40.608368259 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2011 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_RTU_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-tcp-private.h new/libmodbus-3.1.7/src/modbus-tcp-private.h --- old/libmodbus-3.1.6/src/modbus-tcp-private.h 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-tcp-private.h 2021-05-11 00:55:51.703624711 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2011 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_TCP_PRIVATE_H @@ -14,7 +14,7 @@ #define _MODBUS_TCP_CHECKSUM_LENGTH 0 /* In both structures, the transaction ID must be placed on first position - to have a quick access not dependant of the TCP backend */ + to have a quick access not dependent of the TCP backend */ typedef struct _modbus_tcp { /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b (page 23/46): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-tcp.c new/libmodbus-3.1.7/src/modbus-tcp.c --- old/libmodbus-3.1.6/src/modbus-tcp.c 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-tcp.c 2021-10-06 14:28:18.274926595 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2013 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #if defined(_WIN32) @@ -154,7 +154,7 @@ static int _modbus_tcp_send_msg_pre(uint8_t *req, int req_length) { - /* Substract the header length to the message length */ + /* Subtract the header length to the message length */ int mbap_length = req_length - 6; req[4] = mbap_length >> 8; @@ -905,7 +905,7 @@ dest_size = sizeof(char) * _MODBUS_TCP_PI_SERVICE_LENGTH; ret_size = strlcpy(ctx_tcp_pi->service, service, dest_size); } else { - /* Empty service is not allowed, error catched below. */ + /* Empty service is not allowed, error caught below. */ ret_size = 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-tcp.h new/libmodbus-3.1.7/src/modbus-tcp.h --- old/libmodbus-3.1.6/src/modbus-tcp.h 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus-tcp.h 2021-05-11 00:41:40.608368259 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2010 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_TCP_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus-version.h new/libmodbus-3.1.7/src/modbus-version.h --- old/libmodbus-3.1.6/src/modbus-version.h 2019-07-31 23:39:15.536564866 +0200 +++ new/libmodbus-3.1.7/src/modbus-version.h 2022-01-10 21:35:43.935357328 +0100 @@ -26,14 +26,14 @@ #define LIBMODBUS_VERSION_MINOR (1) /* The micro version (3, if %LIBMODBUS_VERSION is 1.2.3) */ -#define LIBMODBUS_VERSION_MICRO (6) +#define LIBMODBUS_VERSION_MICRO (7) /* The full version, like 1.2.3 */ -#define LIBMODBUS_VERSION 3.1.6 +#define LIBMODBUS_VERSION 3.1.7 /* The full version, in string form (suited for string concatenation) */ -#define LIBMODBUS_VERSION_STRING "3.1.6" +#define LIBMODBUS_VERSION_STRING "3.1.7" /* Numerically encoded version, eg. v1.2.3 is 0x010203 */ #define LIBMODBUS_VERSION_HEX ((LIBMODBUS_VERSION_MAJOR << 16) | \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus.c new/libmodbus-3.1.7/src/modbus.c --- old/libmodbus-3.1.6/src/modbus.c 2019-07-31 23:38:15.793103643 +0200 +++ new/libmodbus-3.1.7/src/modbus.c 2022-01-09 00:05:29.918712347 +0100 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2011 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later * * This library implements the Modbus protocol. * http://libmodbus.org/ @@ -961,7 +961,7 @@ nb_write, nb, MODBUS_MAX_WR_WRITE_REGISTERS, MODBUS_MAX_WR_READ_REGISTERS); } else if (mapping_address < 0 || (mapping_address + nb) > mb_mapping->nb_registers || - mapping_address < 0 || + mapping_address_write < 0 || (mapping_address_write + nb_write) > mb_mapping->nb_registers) { rsp_length = response_exception( ctx, &sft, MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS, rsp, FALSE, @@ -1139,7 +1139,7 @@ return nb; } -/* Reads the data from a remove device and put that data into an array */ +/* Reads the data from a remote device and put that data into an array */ static int read_registers(modbus_t *ctx, int function, int addr, int nb, uint16_t *dest) { @@ -1406,7 +1406,7 @@ int rc; int req_length; /* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to - * store the masks. The ugly substraction is there to remove the 'nb' value + * store the masks. The ugly subtraction is there to remove the 'nb' value * (2 bytes) which is not used. */ uint8_t req[_MIN_REQ_LENGTH + 2]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/src/modbus.h new/libmodbus-3.1.7/src/modbus.h --- old/libmodbus-3.1.6/src/modbus.h 2019-07-31 23:38:15.809770344 +0200 +++ new/libmodbus-3.1.7/src/modbus.h 2021-10-06 14:28:18.274926595 +0200 @@ -1,7 +1,7 @@ /* * Copyright ?? 2001-2013 St??phane Raimbault <[email protected]> * - * SPDX-License-Identifier: LGPL-2.1+ + * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef MODBUS_H @@ -245,28 +245,32 @@ #define MODBUS_GET_HIGH_BYTE(data) (((data) >> 8) & 0xFF) #define MODBUS_GET_LOW_BYTE(data) ((data) & 0xFF) #define MODBUS_GET_INT64_FROM_INT16(tab_int16, index) \ - (((int64_t)tab_int16[(index) ] << 48) + \ - ((int64_t)tab_int16[(index) + 1] << 32) + \ - ((int64_t)tab_int16[(index) + 2] << 16) + \ + (((int64_t)tab_int16[(index) ] << 48) | \ + ((int64_t)tab_int16[(index) + 1] << 32) | \ + ((int64_t)tab_int16[(index) + 2] << 16) | \ (int64_t)tab_int16[(index) + 3]) -#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) + tab_int16[(index) + 1]) -#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) + tab_int8[(index) + 1]) +#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) \ + (((int32_t)tab_int16[(index) ] << 16) | \ + (int32_t)tab_int16[(index) + 1]) +#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) \ + (((int16_t)tab_int8[(index) ] << 8) | \ + (int16_t)tab_int8[(index) + 1]) #define MODBUS_SET_INT16_TO_INT8(tab_int8, index, value) \ do { \ - tab_int8[(index)] = (value) >> 8; \ - tab_int8[(index) + 1] = (value) & 0xFF; \ + ((int8_t*)(tab_int8))[(index) ] = (int8_t)((value) >> 8); \ + ((int8_t*)(tab_int8))[(index) + 1] = (int8_t)(value); \ } while (0) #define MODBUS_SET_INT32_TO_INT16(tab_int16, index, value) \ do { \ - tab_int16[(index) ] = (value) >> 16; \ - tab_int16[(index) + 1] = (value); \ + ((int16_t*)(tab_int16))[(index) ] = (int16_t)((value) >> 16); \ + ((int16_t*)(tab_int16))[(index) + 1] = (int16_t)(value); \ } while (0) #define MODBUS_SET_INT64_TO_INT16(tab_int16, index, value) \ do { \ - tab_int16[(index) ] = (value) >> 48; \ - tab_int16[(index) + 1] = (value) >> 32; \ - tab_int16[(index) + 2] = (value) >> 16; \ - tab_int16[(index) + 3] = (value); \ + ((int16_t*)(tab_int16))[(index) ] = (int16_t)((value) >> 48); \ + ((int16_t*)(tab_int16))[(index) + 1] = (int16_t)((value) >> 32); \ + ((int16_t*)(tab_int16))[(index) + 2] = (int16_t)((value) >> 16); \ + ((int16_t*)(tab_int16))[(index) + 3] = (int16_t)(value); \ } while (0) MODBUS_API void modbus_set_bits_from_byte(uint8_t *dest, int idx, const uint8_t value); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/LICENSE new/libmodbus-3.1.7/tests/LICENSE --- old/libmodbus-3.1.6/tests/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/libmodbus-3.1.7/tests/LICENSE 2020-04-05 21:38:16.865082459 +0200 @@ -0,0 +1,30 @@ +Copyright (c) 2008-2014 by St??phane Raimbault +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. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +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 THE COPYRIGHT +OWNER OR CONTRIBUTORS 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/Makefile.am new/libmodbus-3.1.7/tests/Makefile.am --- old/libmodbus-3.1.6/tests/Makefile.am 2019-07-31 23:38:15.809770344 +0200 +++ new/libmodbus-3.1.7/tests/Makefile.am 2021-05-11 00:41:40.608368259 +0200 @@ -1,4 +1,4 @@ -EXTRA_DIST = README.md unit-tests.sh +EXTRA_DIST = README.md unit-tests.sh LICENSE noinst_PROGRAMS = \ bandwidth-server-one \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/README.md new/libmodbus-3.1.7/tests/README.md --- old/libmodbus-3.1.6/tests/README.md 2019-07-31 23:38:15.809770344 +0200 +++ new/libmodbus-3.1.7/tests/README.md 2021-05-11 00:55:51.703624711 +0200 @@ -21,7 +21,7 @@ behavior. - `bandwidth-server-one`, `bandwidth-server-many-up` and `bandwidth-client` - return very useful information about the performance of transfert rate between + return very useful information about the performance of transfer rate between the server and the client. `bandwidth-server-one` can only handles one connection at once with a client whereas `bandwidth-server-many-up` opens a connection for each new clients (with a limit). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/bandwidth-client.c new/libmodbus-3.1.7/tests/bandwidth-client.c --- old/libmodbus-3.1.6/tests/bandwidth-client.c 2019-07-31 23:38:15.809770344 +0200 +++ new/libmodbus-3.1.7/tests/bandwidth-client.c 2021-05-11 00:55:51.703624711 +0200 @@ -59,7 +59,7 @@ use_backend = RTU; n_loop = 100; } else { - printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]); + printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]); exit(1); } } else { @@ -104,7 +104,7 @@ elapsed = end - start; rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start); - printf("Transfert rate in points/seconds:\n"); + printf("Transfer rate in points/seconds:\n"); printf("* %d points/s\n", rate); printf("\n"); @@ -116,7 +116,7 @@ printf("* %d KiB/s\n", rate); printf("\n"); - /* TCP: Query and reponse header and values */ + /* TCP: Query and response header and values */ bytes = 12 + 9 + (nb_points / 8) + ((nb_points % 8) ? 1 : 0); printf("Values and TCP Modbus overhead:\n"); printf("* %d x %d bytes\n", n_loop, bytes); @@ -141,7 +141,7 @@ elapsed = end - start; rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start); - printf("Transfert rate in points/seconds:\n"); + printf("Transfer rate in points/seconds:\n"); printf("* %d registers/s\n", rate); printf("\n"); @@ -153,7 +153,7 @@ printf("* %d KiB/s\n", rate); printf("\n"); - /* TCP:Query and reponse header and values */ + /* TCP:Query and response header and values */ bytes = 12 + 9 + (nb_points * sizeof(uint16_t)); printf("Values and TCP Modbus overhead:\n"); printf("* %d x %d bytes\n", n_loop, bytes); @@ -180,7 +180,7 @@ elapsed = end - start; rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start); - printf("Transfert rate in points/seconds:\n"); + printf("Transfer rate in points/seconds:\n"); printf("* %d registers/s\n", rate); printf("\n"); @@ -192,7 +192,7 @@ printf("* %d KiB/s\n", rate); printf("\n"); - /* TCP:Query and reponse header and values */ + /* TCP:Query and response header and values */ bytes = 12 + 9 + (nb_points * sizeof(uint16_t)); printf("Values and TCP Modbus overhead:\n"); printf("* %d x %d bytes\n", n_loop, bytes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/bandwidth-server-one.c new/libmodbus-3.1.7/tests/bandwidth-server-one.c --- old/libmodbus-3.1.6/tests/bandwidth-server-one.c 2019-07-31 23:38:15.809770344 +0200 +++ new/libmodbus-3.1.7/tests/bandwidth-server-one.c 2021-05-11 00:55:51.703624711 +0200 @@ -38,7 +38,7 @@ } else if (strcmp(argv[1], "rtu") == 0) { use_backend = RTU; } else { - printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]); + printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]); exit(1); } } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/unit-test-client.c new/libmodbus-3.1.7/tests/unit-test-client.c --- old/libmodbus-3.1.6/tests/unit-test-client.c 2019-07-31 23:38:15.813103686 +0200 +++ new/libmodbus-3.1.7/tests/unit-test-client.c 2021-10-06 14:28:18.274926595 +0200 @@ -108,13 +108,6 @@ modbus_free(ctx); return -1; } - modbus_get_response_timeout(ctx, &new_response_to_sec, &new_response_to_usec); - - printf("** UNIT TESTING **\n"); - - printf("1/1 No response timeout modification on connect: "); - ASSERT_TRUE(old_response_to_sec == new_response_to_sec && - old_response_to_usec == new_response_to_usec, ""); /* Allocate and initialize the memory to store the bits */ nb_points = (UT_BITS_NB > UT_INPUT_BITS_NB) ? UT_BITS_NB : UT_INPUT_BITS_NB; @@ -127,6 +120,13 @@ tab_rp_registers = (uint16_t *) malloc(nb_points * sizeof(uint16_t)); memset(tab_rp_registers, 0, nb_points * sizeof(uint16_t)); + printf("** UNIT TESTING **\n"); + + printf("1/1 No response timeout modification on connect: "); + modbus_get_response_timeout(ctx, &new_response_to_sec, &new_response_to_usec); + ASSERT_TRUE(old_response_to_sec == new_response_to_sec && + old_response_to_usec == new_response_to_usec, ""); + printf("\nTEST WRITE/READ:\n"); /** COIL BITS **/ @@ -533,7 +533,7 @@ rc = modbus_report_slave_id(ctx, NB_REPORT_SLAVE_ID, tab_rp_bits); ASSERT_TRUE(rc == NB_REPORT_SLAVE_ID, ""); - /* Slave ID is an arbitraty number for libmodbus */ + /* Slave ID is an arbitrary number for libmodbus */ ASSERT_TRUE(rc > 0, ""); /* Run status indicator is ON */ @@ -622,7 +622,7 @@ printf("1/2 Too small byte timeout (3ms < 5ms): "); ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, ""); - /* Wait remaing bytes before flushing */ + /* Wait remaining bytes before flushing */ usleep(11 * 5000); modbus_flush(ctx); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodbus-3.1.6/tests/unit-test-server.c new/libmodbus-3.1.7/tests/unit-test-server.c --- old/libmodbus-3.1.6/tests/unit-test-server.c 2019-07-31 23:38:15.813103686 +0200 +++ new/libmodbus-3.1.7/tests/unit-test-server.c 2021-10-18 15:28:51.363883143 +0200 @@ -92,7 +92,7 @@ /* Initialize values of INPUT REGISTERS */ for (i=0; i < UT_INPUT_REGISTERS_NB; i++) { - mb_mapping->tab_input_registers[i] = UT_INPUT_REGISTERS_TAB[i];; + mb_mapping->tab_input_registers[i] = UT_INPUT_REGISTERS_TAB[i]; } if (use_backend == TCP) {
