Fix modbus segfault / New strategy for connecting
authorStefan Nickl <Stefan.Nickl@gmail.com>
Sat, 28 Jan 2012 18:21:10 +0000 (19:21 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 25 May 2013 09:05:18 +0000 (11:05 +0200)
commita0d1ec3873bc43497d9c162fae6eb09d6ea4200a
tree1fbbd5b1f4219cdbda6d765672042c4ce9ef5e91
parentcdea931a51b0c5bebb37007da965635cbae74b40
Fix modbus segfault / New strategy for connecting

The previous implementation had a reconnection loop which should not
really be necessary. Idea tried here is to check if connection is alive,
and establish it if not. Change was begun because previously connection
would only be attempted as a retry, so on first pass a NULL was handed to
libmodbus which caused segmentation faults reproducibly.

Signed-off-by: Florian Forster <octo@collectd.org>
src/modbus.c