From: hadaq Date: Tue, 9 Dec 2003 15:05:15 +0000 (+0000) Subject: workaround not necessary for udp X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8f3a6cdd92e6541cfffe24ef3195ed2ab26eb96d;p=daqdata.git workaround not necessary for udp --- diff --git a/hadaq/nettrans.c b/hadaq/nettrans.c index 71ea4ec..d45cb7e 100644 --- a/hadaq/nettrans.c +++ b/hadaq/nettrans.c @@ -1,4 +1,4 @@ -static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.33 2003-12-09 14:53:02 hadaq Exp $"; +static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.34 2003-12-09 15:05:15 hadaq Exp $"; #define _GNU_SOURCE @@ -311,10 +311,12 @@ static size_t adjustedSize(NetTrans *my, void *hadTu) size_t size; size = HadTu_paddedSize(hadTu) + 32; - /* round to the next 1K boundary to circumvent bug in CES ATM driver */ - size = (size & 0x3ff) == 0 ? size : (size & ~0x3ff) + 0x400; - if (size % my->mtuSize == 0) { - size += 0x400; + if (my->type == NetTransType_atm) { + /* round to the next 1K boundary to circumvent bug in CES ATM driver */ + size = (size & 0x3ff) == 0 ? size : (size & ~0x3ff) + 0x400; + if (size % my->mtuSize == 0) { + size += 0x400; + } } return size; }