Merge pull request #19 from lategoodbye/master

Small bugfixes (retry counter, command args)
This commit is contained in:
Robert Johansson 2012-07-19 14:35:09 -07:00
commit 0ca0148bba
2 changed files with 3 additions and 2 deletions

View File

@ -50,8 +50,8 @@ main(int argc, char **argv)
} }
else if (argc == 4 && strcmp(argv[1], "-d") == 0) else if (argc == 4 && strcmp(argv[1], "-d") == 0)
{ {
device = argv[1]; device = argv[2];
addr_mask = strdup(argv[2]); addr_mask = strdup(argv[3]);
debug = 1; debug = 1;
} }
else if (argc == 4 && strcmp(argv[1], "-b") == 0) else if (argc == 4 && strcmp(argv[1], "-b") == 0)

View File

@ -1672,6 +1672,7 @@ mbus_sendrecv_request(mbus_handle *handle, int address, mbus_frame *reply, int m
if (result == MBUS_RECV_RESULT_OK) if (result == MBUS_RECV_RESULT_OK)
{ {
retry = 0;
mbus_purge_frames(handle); mbus_purge_frames(handle);
} }
else if (result == MBUS_RECV_RESULT_TIMEOUT) else if (result == MBUS_RECV_RESULT_TIMEOUT)