Merge pull request #16 from lategoodbye/master
Bugfixes for serial tools
This commit is contained in:
commit
3386f0a419
@ -79,7 +79,7 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!mbus_connect(handle))
|
||||
if (mbus_connect(handle) == -1)
|
||||
{
|
||||
printf("Failed to setup connection to M-bus gateway\n");
|
||||
return 1;
|
||||
|
@ -31,6 +31,9 @@ main(int argc, char **argv)
|
||||
|
||||
char *device, *addr_str, *xml_result;
|
||||
int address, baudrate = 9600;
|
||||
|
||||
memset((void *)&reply, 0, sizeof(mbus_frame));
|
||||
memset((void *)&reply_data, 0, sizeof(mbus_frame_data));
|
||||
|
||||
if (argc == 3)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!mbus_connect(handle))
|
||||
if (mbus_connect(handle) == -1)
|
||||
{
|
||||
printf("Failed to setup connection to M-bus gateway\n");
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user