summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordraskovic2009-10-09 10:53:04 +0000
committerdraskovic2009-10-09 10:53:04 +0000
commit0c83295b48bab4f30f839f7cd4e0f72a6479d6bb (patch)
tree913f849bc9f559dfb07813a58571ebfbbaf2cd75
parent02cef13739ebc208a5c6558fb21231bf1f33077f (diff)
[CLEO][LIBMME] Preventd fragmentation info negative value - correcetd the bug in which number of packets can be 0.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6061 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cleopatre/application/libmme/src/mme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cleopatre/application/libmme/src/mme.c b/cleopatre/application/libmme/src/mme.c
index f61f7f6915..b2c31fb69d 100644
--- a/cleopatre/application/libmme/src/mme.c
+++ b/cleopatre/application/libmme/src/mme.c
@@ -426,7 +426,7 @@ mme_error_t mme_send (mme_ctx_t *ctx, mme_send_type_t type, unsigned char *iface
/* calculate number of mme packets needed */
nbpkt = (ctx->tail - ctx->head) / ( PKTSIZE - sizeof(MME_t) );
- if ( (ctx->tail - ctx->head) % ( PKTSIZE - sizeof(MME_t) ) > 0 )
+ if ( nbpkt == 0 || (ctx->tail - ctx->head) % ( PKTSIZE - sizeof(MME_t) ) > 0 )
{
nbpkt++;
}