From 736181b35e98247d985f451ea9b52f6ea8f0562a Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 4 Jul 2012 21:15:55 +0200 Subject: [PATCH] Revert "Fix problem with multiple selected devices (secondary address) resend " This reverts commit 1fa5e202fb5af6c343d0597693185aa406dda7a9. --- bin/mbus-serial-request-data-multi-reply.c | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/bin/mbus-serial-request-data-multi-reply.c b/bin/mbus-serial-request-data-multi-reply.c index 36831bc..5666527 100644 --- a/bin/mbus-serial-request-data-multi-reply.c +++ b/bin/mbus-serial-request-data-multi-reply.c @@ -101,7 +101,7 @@ main(int argc, char **argv) frame->address = MBUS_ADDRESS_NETWORK_LAYER; if (debug) - printf("%s: debug: sending init frame #1\n", __PRETTY_FUNCTION__); + printf("%s: debug: sending init frame\n", __PRETTY_FUNCTION__); if (mbus_send_frame(handle, frame) == -1) { @@ -110,27 +110,8 @@ main(int argc, char **argv) return 1; } - while (mbus_recv_frame(handle, &reply) != -1); + mbus_recv_frame(handle, &reply); - // - // resend SND_NKE, maybe the first get lost - // - - frame->control = MBUS_CONTROL_MASK_SND_NKE | MBUS_CONTROL_MASK_DIR_M2S; - frame->address = MBUS_ADDRESS_NETWORK_LAYER; - - if (debug) - printf("%s: debug: sending init frame #2\n", __PRETTY_FUNCTION__); - - if (mbus_send_frame(handle, frame) == -1) - { - fprintf(stderr, "Failed to send mbus frame.\n"); - mbus_frame_free(frame); - return 1; - } - - while (mbus_recv_frame(handle, &reply) != -1); - if (strlen(addr_str) == 16) { // secondary addressing