From: Ji Lu Date: Thu, 1 Apr 2010 15:00:33 +0000 (+0000) Subject: passed test X-Git-Tag: initial-import-from-subversion-38251~22329 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ebb09b65cddeee11ea8a6e3a95eb328bc0f7711c;p=oweals%2Fgnunet.git passed test --- diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index 74d5a6b4c..c3739a3e9 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c @@ -50,10 +50,9 @@ struct Fragment uint16_t off GNUNET_PACKED; /** - * "unique" id for the fragment - */ + * "unique" id for the fragment + */ uint32_t id GNUNET_PACKED; - uint16_t mtu; uint16_t totalNum; uint16_t totalSize; @@ -153,7 +152,6 @@ GNUNET_FRAGMENT_fragment (const struct GNUNET_MessageHeader *msg, } } - /** * Create a defragmentation context. * @@ -216,7 +214,6 @@ GNUNET_FRAGMENT_process (struct GNUNET_FRAGMENT_Context *ctx, buffer = ctx->buffer; while (buffer != NULL) { -//for(buffer = ctx->buffer; buffer != NULL; buffer = buffer->next){ if(buffer->id == ntohl(frag->id)&&(buffer->peerID==sender)){ exist = 1; break; diff --git a/src/fragmentation/test_frag_ji.c b/src/fragmentation/test_frag_ji.c index 6512ddb03..4779abddd 100644 --- a/src/fragmentation/test_frag_ji.c +++ b/src/fragmentation/test_frag_ji.c @@ -41,7 +41,7 @@ main(int argc, char * argv[]){ struct GNUNET_FRAGMENT_Context * ctx; struct GNUNET_MessageHeader *msg = (struct GNUNET_MessageHeader *)GNUNET_malloc(sizeof(struct GNUNET_MessageHeader)+2*mtu); ctx = GNUNET_FRAGMENT_context_create(NULL, message_proc1, msg); - msg->size = htons(sizeof(struct GNUNET_MessageHeader)+2*mtu); + msg->size = htons(sizeof(struct GNUNET_MessageHeader)+4*mtu); msg->type = htons(GNUNET_MESSAGE_TYPE_HELLO); struct GNUNET_PeerIdentity *sender; sender = (struct GNUNET_PeerIdentity *)GNUNET_malloc(sizeof(struct GNUNET_PeerIdentity));