Examples from bin directory updated. API usage updated in mbus-protocol-aux.h.
This commit is contained in:
@ -51,7 +51,13 @@ main(int argc, char **argv)
|
||||
mbus_register_recv_event(&mbus_dump_recv_event);
|
||||
}
|
||||
|
||||
if ((handle = mbus_connect_tcp(host, port)) == NULL)
|
||||
if ((handle = mbus_context_tcp(host, port)) == NULL)
|
||||
{
|
||||
printf("Scan failed: Could not initialize M-Bus context: %s\n", mbus_error_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!mbus_connect(handle))
|
||||
{
|
||||
printf("Scan failed: Could not setup connection to M-bus gateway: %s\n", mbus_error_str());
|
||||
return 1;
|
||||
@ -110,6 +116,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
mbus_disconnect(handle);
|
||||
mbus_context_free(handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user