Re: [Daqpp-forum] bug
Brought to you by:
lacasta
|
From: Carlos L. <Car...@if...> - 2007-02-02 07:05:33
|
Mmmm, yes, you are right. I'll fix it here as well... Do we still need
to check what you mentioned on your previous mail about the DAtaRecord ?
Carlos
On Wed, 2007-01-31 at 16:59 -0500, Andrej Studen wrote:
> Selection criteria for observers (in vmedaq.cc, line 128, marked below) is
> leaking. Most notably:
>
> 0xb0000 [SecDetData] & 0x10000 [NormalData] == 0x10000 [NormalData]
> ( b=[1011] 1=[0001] )
>
> and handler for SecDetData gets called on NormalData. I know that the
> obvious criteria ip->second == data_type was replaced to allow for general
> purpose observers (with ip->second=0xffffffff). I suggest an or:
>
> if (ip->second == data_type || ip->second == 0xffffffff)
>
> Will correct here.
>
> Cheers
>
> Andrej
>
> Attached - pieces of code that should show the error:
>
> vmedaq.cc[121-139]:
> case DataRecord:
> evt_num = data[1] & 0xffffff;
> if ( _last_event != evt_num ) {
> NewEvent(evt_num);
> _last_event = evt_num;
> }
> for (ip=observers.begin();ip!=observers.end();++ip) {
> --> if ( (ip->second & data_type) == data_type) {
> if (evt_num != ip->first->last_event())
> {
> if (ip->first->last_event()>=0)
> ip->first->onEndOfEvent(ip->first->last_event(),
> ip->first->module(id));
> ip->first->last_event( evt_num );
> }
> ip->first->DataRecord(data);
> }
> }
> break;
>
> DataFormat.h[171-180]:
> enum DataType {
> NormalData = 0x10000,
> PulseData = 0x20000,
> ScanData = 0x30000,
> ADCdata = 0x40000,
> CSPRINTdata = 0x80000,
> FBTDCdata = 0x90000,
> SIS3300data = 0xa0000,
> SecDetData = 0xb0000
> };
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Daqpp-forum mailing list
> Daq...@li...
> https://lists.sourceforge.net/lists/listinfo/daqpp-forum
--
___________________________________________________________________
Carlos Lacasta
^^^^^^^^^^^^^^^
Inst. de Fisica Corpuscular (IFIC)
Edificio Institutos de Investigacion
P.O. Box 22085
E-46071 VALENCIA
Spain
Tel.: +34 96 354 3490
Fax.: +34 96 354 3488
Car...@if...
___________________________________________________________________
|