1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-25 18:02:49 +02:00

fw/antorcha.c (send_image, param): update hash when sending salt

This commit is contained in:
Werner Almesberger 2012-06-27 03:30:33 -03:00
parent 3241822a93
commit 558f5a7503

View File

@ -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 */