part->index = tpkt->m_part;
part->mtime = tpkt->m_res_mtime;
part->size = tpkt->m_res_size;
- if (tpkt->m_hash64) {
- memcpy(part->hash64, tpkt->m_hash64, 64);
- } else {
- bmemzero(part->hash64, 64);
- }
+ memcpy(part->hash64, tpkt->m_hash64, 64);
iuploads->put(part->index, part);
}
/* returns the list of items to truncate : cloud parts-uploads*/
for (int i=1; i <= parts.last_index() ; i++) {
cloud_part *p = (cloud_part *)parts.get(i);
if (p) {
- if (p->hash64) {
- dir->fsend("part=%d size=%lld mtime=%lld hash=%s\n", i, p->size, p->mtime, p->hash64);
- } else {
- dir->fsend("part=%d size=%lld mtime=%lld hash=%s\n", i, p->size, p->mtime);
- }
+ dir->fsend("part=%d size=%lld mtime=%lld hash=%s\n", i, p->size, p->mtime, p->hash64);
free(p);
}
}