Revision 64144d8f chunk_pusher.c

View differences:

chunk_pusher.c
21 21
	//we need to pack 5 int32s + 2 timeval structs + 1 double
22 22
	static size_t ExternalChunk_header_size = 5*CHUNK_TRANSCODING_INT_SIZE + 2*CHUNK_TRANSCODING_INT_SIZE + 2*CHUNK_TRANSCODING_INT_SIZE + 1*CHUNK_TRANSCODING_INT_SIZE*2;
23 23
	
24
	//update the chunk len
24
	//update the chunk len here because here we know the external chunk header size
25 25
	echunk->len = echunk->payload_len + ExternalChunk_header_size;
26 26

  
27 27
	/* first pack the chunk info that we get from the streamer into an "attributes" block of a regular GRAPES chunk */
......
54 54
		gchunk.data = echunk->data;
55 55

  
56 56
#ifdef NHIO
57
			write_chunk(&gchunk);
57
		write_chunk(&gchunk);
58 58
#else
59
			ret = sendViaCurl(gchunk, ExternalChunk_header_size, echunk, url);
59
		/* 20 bytes are needed to put the chunk header info on the wire + attributes size + payload */
60
		ret = sendViaCurl(gchunk, GRAPES_ENCODED_CHUNK_HEADER_SIZE + gchunk.attributes_size + gchunk.size, url);
60 61
#endif
61 62

  
62 63
		free(grapes_chunk_attributes_block);

Also available in: Unified diff