+ if (is_num_bytes && !((status->position == 1) && (status->of_total == 100))) {
+ /* We know that we're in a different message when the
+ total number of bytes to transfer is different. Of
+ course it could fail if we're transferring messages
+ of the same size, but this is a workarround */
+ if (status->of_total != helper->last_total_bytes) {
+ priv->done++;
+ helper->sum_total_bytes += helper->last_total_bytes;
+ helper->last_total_bytes = status->of_total;
+ }
+ state->bytes_done += status->position + helper->sum_total_bytes;
+ state->bytes_total = helper->total_bytes;