]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Next try to circumvent the ATM driver
authorhades <hades>
Fri, 10 Nov 2000 22:11:42 +0000 (22:11 +0000)
committerhades <hades>
Fri, 10 Nov 2000 22:11:42 +0000 (22:11 +0000)
hadaq/nettrans.c

index 06daf1b40c9e668a10d407003fb91f1337650798..d9fe7ea9519c6b184745c36fb27cebb743b7060e 100644 (file)
@@ -1,4 +1,4 @@
-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.18 2000-11-10 21:25:54 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/nettrans.c,v 6.19 2000-11-10 22:11:42 hades Exp $";
 
 #define _GNU_SOURCE
 #include <unistd.h>
@@ -24,8 +24,6 @@ static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/had
 #include "worker.h"
 #include "nettrans.h"
 
-#define EOPSTRING "Der CES ATM Treiber ist Muell"
-
 static int min(int a, int b)
 {
        return a < b ? a : b;
@@ -342,8 +340,8 @@ int NetTrans_send(NetTrans *my, void *hadTu)
                pktSize = min(my->mtuSize, HadTu_size(hadTu) - my->offset);
 
                /* we reserve pkts < 32 Byte for control messages */
-               if (pktSize < 32) {
-                       my->pktSize = 32;
+               if (pktSize < (2 * 1024)) {
+                       my->pktSize = (2 * 1024);
                } else {
                        my->pktSize = pktSize;
                }
@@ -355,12 +353,8 @@ int NetTrans_send(NetTrans *my, void *hadTu)
        }
 
        /* mark the end of message */
-#if 0
        my->pkt = hadTu;
-#else
-       my->pkt = EOPSTRING;
-#endif
-       my->pktSize = 24;
+       my->pktSize = 1024;
 
        if (0 > sendGeneric(my)) {
                return -1;
@@ -393,11 +387,7 @@ static int assembleMsg(NetTrans *my, void *hadTu, size_t size)
                abort();
        }
 
-#if 0
-       if (my->pktSize != 24) {
-#else
-       if (memcmp(my->pkt, EOPSTRING, 24) != 0) {
-#endif
+       if (my->pktSize != 1024) {
                my->offset += my->pktSize;
                (*my->pktsReceived)++;
                retVal = 0;