From 558f5a7503f88f416b559ff96a6f2687da740ed5 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 27 Jun 2012 03:30:33 -0300 Subject: [PATCH] fw/antorcha.c (send_image, param): update hash when sending salt --- tools/antorcha.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/antorcha.c b/tools/antorcha.c index 6a3b78e..d52302d 100644 --- a/tools/antorcha.c +++ b/tools/antorcha.c @@ -242,7 +242,9 @@ static void send_image(struct atrf_dsc *dsc, void *buf, int len) /* @@@ salt */ packet(dsc, IMAGE, seq++, last, payload, PAYLOAD); + hash_merge(payload, PAYLOAD); packet(dsc, IMAGE, seq++, last, payload, PAYLOAD); + hash_merge(payload, PAYLOAD); hash_end(); /* hash */ @@ -370,7 +372,9 @@ static void param(struct atrf_dsc *dsc) /* @@@ salt */ packet(dsc, PARAM, 1, 4, payload, PAYLOAD); + hash_merge(payload, PAYLOAD); packet(dsc, PARAM, 2, 4, payload, PAYLOAD); + hash_merge(payload, PAYLOAD); hash_end(); /* hash */