From cbb94be759f6bd4981a807e259243d10519ac740 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Thu, 18 Feb 2016 21:58:23 +0100 Subject: [PATCH] Send correct region value --- nmrp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nmrp.c b/nmrp.c index 2a801f1..db351fa 100644 --- a/nmrp.c +++ b/nmrp.c @@ -376,7 +376,7 @@ int nmrp_do(struct nmrpd_args *args) { struct nmrp_pkt tx, rx; uint8_t *src, dest[6]; - uint16_t len; + uint16_t len, region; char *filename; time_t beg; int i, status, ulreqs, expect, upload_ok; @@ -514,7 +514,8 @@ int nmrp_do(struct nmrpd_args *args) #ifdef NMRPFLASH_SET_REGION if (args->region) { - msg_opt_add(&tx.msg, NMRP_O_DEV_REGION, &args->region, 2); + region = htons(args->region); + msg_opt_add(&tx.msg, NMRP_O_DEV_REGION, ®ion, 2); } #endif