fix byte order for version field in MDP rhizome blocks (used

native instead of consistent byte ordering).
This commit is contained in:
gardners 2013-08-25 22:08:40 +09:30
parent 39785313f3
commit b18a78f6c6

View File

@ -70,8 +70,9 @@ int rhizome_mdp_send_block(struct subscriber *dest, unsigned char *id, uint64_t
reply.out.payload[0]='B'; // reply contains blocks reply.out.payload[0]='B'; // reply contains blocks
// include 16 bytes of BID prefix for identification // include 16 bytes of BID prefix for identification
bcopy(id, &reply.out.payload[1], 16); bcopy(id, &reply.out.payload[1], 16);
// and version of manifest // and version of manifest (in the correct byte order)
bcopy(&version, &reply.out.payload[1+16], sizeof(uint64_t)); // bcopy(&version, &reply.out.payload[1+16], sizeof(uint64_t));
write_uint64(&reply.out.payload[1+16],version);
int i; int i;
for(i=0;i<32;i++){ for(i=0;i<32;i++){