Commit Graph

114 Commits

Author SHA1 Message Date
858aea33ab add more checks in lower layers
to avoid segmentation faults, out of bounds access and integer overflow
make parseable for splint
suppress splint warnings about datatype cc_t
fix type of return value for read()
add checks before accessing tty
2013-05-13 08:41:38 +02:00
4d85dad403 change TCP port datatype from int to uint16_t
because int doesn't match the range
add range check in every TCP binary
2013-05-12 21:26:38 +02:00
c59e763a84 minor fixes
remove unreachable code
add parameter checks to mbus_data_bcd_encode
init time structure in mbus_data_tm_decode as possible
mark falltrough for splint
remove unused variable val
fix removed realloc
2013-05-04 22:43:23 +02:00
ee209023b8 fix memleaks
avoid memleak if memory is full
fix "memleak" at the end of mbus_parse_hex
2013-05-04 19:17:27 +02:00
3935b4013e make parseable for splint
- replace non standard u_char with unsigned char (ANSI)
- advice splint to ignore variadic macros
- move declarations from the middle to top of functions (C90)
- replace local library includes <> to ""
2013-05-04 18:14:18 +02:00
0d6bb583c2 add missing initialization (thanks to valgrind) 2013-05-03 17:23:18 +02:00
e1657399ff add new function to send application reset incl. subcode
fix typo in comment
add new program to test experimental feature application reset
add mbus-tcp-application-reset to build process
2013-04-27 13:16:44 +02:00
153828268a combine typedef and struct to avoid same comments
combine enum and struct to avoid same comments
add comments for mbus_context_option
add missing parameters in comments
2013-04-17 22:46:04 +02:00
5500db0898 add missing checks after memory allocation
add missing memset after memory allocation
2013-04-11 22:05:08 +02:00
72ee386e10 version string as const char* 2013-04-09 10:18:27 +02:00
a3018692dc mbus_ prefix added 2013-04-06 19:05:45 +02:00
8fcdf3bf3b function declaration added 2013-04-05 15:13:18 +02:00
c6fc41484f small function to get current version added 2013-04-04 00:49:03 +02:00
6166553755 Make my last change more readable.
As suggested by lategoodbye. Also make it more in line with the way
everything else is written.
2013-03-17 09:19:29 +01:00
363f59a149 Ignore filler DIF (= 0x2F) 2013-03-11 09:27:16 +01:00
b1063db3bc replace magic numbers with defines
fix MBUS_MAX_PRIMARY_SLAVES to 250
2013-03-02 18:03:31 +01:00
4cd114e911 Fix undeclared variable 2013-01-14 12:28:14 +02:00
61fd2aa1c7 add new helper functions to check primary and secondary addresses 2012-12-31 13:37:17 +01:00
2335deb742 Fix segmentation fault
- check if L Field is at least 3 to avoid crash (MBDOC48.PDF, page 23)
2012-12-22 00:08:59 +01:00
1080031879 Merge remote-tracking branch 'origin/master'
Conflicts:
	mbus/mbus-protocol.c
2012-12-20 20:57:33 +01:00
404e245af5 replace magic number with define 2012-12-20 20:42:10 +01:00
a4e92f6eab replace magic number with define 2012-12-20 20:12:19 +01:00
746e611236 Merge remote-tracking branch 'upstream/master'
Conflicts:
	mbus/mbus-protocol-aux.h
2012-12-12 18:06:40 +01:00
9b94df16b9 - add new type for context options
- add new function mbus_context_set_option to set context specific
options like retransmission or echo cancelation
2012-12-11 20:22:26 +01:00
dc948566db remove unnecessary POSIX header 2012-12-10 21:26:48 +01:00
72868fdc3f add a new helper function ( mbus_hex2bin ) to convert hex values
into binary values
2012-12-10 21:16:46 +01:00
72341baea5 Modify C header files to include from C++ code 2012-12-05 21:24:58 +02:00
cfa35db086 Fixed potential segmentation fault 2012-10-22 23:35:45 +02:00
688f0d3bc0 Added product name mapping for Elvaco meters 2012-10-21 23:24:04 +02:00
bc2c85c378 Add custom VIFE handling with a corrective factor (from Jakob
Skov-Pedersen)
2012-10-21 11:21:07 +02:00
0c26bc17a7 Add VIF for digital input and output
Correct some cases
2012-10-21 11:09:21 +02:00
99d48d27b2 Extended mbus_data_variable_print to print out VIF/VIFE 2012-10-21 11:05:08 +02:00
3de91c5eab Added product name mapping for Ista sensonic II mbus 2012-10-05 22:09:07 +02:00
30ab8dd643 handle direction of ACK correctly 2012-10-04 23:20:28 +02:00
fef774d98d Purge behavior as new context parameter (default = purge master to
slave)
2012-10-04 22:33:22 +02:00
78f16f0248 New defines for purge behavior (echo cancelation) 2012-10-04 22:30:53 +02:00
af80dda0d8 Revert "Extend mbus_recv_frame with simple echo cancelation"
This reverts commit 169e37d360.
2012-10-03 23:25:10 +02:00
169e37d360 Extend mbus_recv_frame with simple echo cancelation 2012-10-03 23:06:11 +02:00
d211c3cbcb new function mbus_frame_direction to get the direction of a frame
(slave to master or vice versa)
2012-10-03 23:03:05 +02:00
d6c5529247 new function mbus_frame_direction to get the direction of a frame
(slave to master or vice versa)
extended mbus_frame_data_parse to check the direction of a frame
2012-10-03 23:01:44 +02:00
fe4217772c Added product name mapping for Sensus PolluCom E 2012-09-17 21:01:53 +02:00
1ae8869d7b convert all control chars into spaces to be xml 1.0 conform 2012-09-16 18:15:55 +02:00
564483e092 new error message in case of unknown vif 2012-09-15 02:11:14 +02:00
b55d038899 fixed typo in vif list 2012-09-15 02:06:08 +02:00
1a538e73aa New parameter for mbus_send_ping_frame to purge response 2012-09-01 22:51:44 +02:00
d2608d5de7 add allocation error handling 2012-09-01 22:14:21 +02:00
e653894bce Merge remote-tracking branch 'upstream/master' 2012-08-25 09:09:50 +02:00
dbd69e49f5 make sure that records are initialized to avoid potential core dumps after incomplete parsning and repacking 2012-08-12 19:08:14 +09:00
166b93a1b1 Added product name mapping for Kamstrup 382 2012-07-25 00:09:11 +02:00
d816a1c30f Merge branch 'master' of github.com:rscada/libmbus 2012-07-25 00:04:16 +09:00