From: hades Date: Fri, 10 Nov 2000 22:11:42 +0000 (+0000) Subject: Next try to circumvent the ATM driver X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=644afd7ca38d8d75b863e4794547daa085f7b13a;p=daqdata.git Next try to circumvent the ATM driver --- diff --git a/hadaq/nettrans.c b/hadaq/nettrans.c index 06daf1b..d9fe7ea 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.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 @@ -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;