]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
workaround not necessary for udp
authorhadaq <hadaq>
Tue, 9 Dec 2003 15:05:15 +0000 (15:05 +0000)
committerhadaq <hadaq>
Tue, 9 Dec 2003 15:05:15 +0000 (15:05 +0000)
hadaq/nettrans.c

index 71ea4ec4af9c958dd6cbdb437816489825fd9e83..d45cb7ec9154004e2f46d6355feaec851171c8c9 100644 (file)
@@ -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;
 }