Novice question about sequence

gigi gigi@symbolic.it
Wed, 13 Aug 1997 11:09:06 +0200


Hi,
I need help about sequence:
I've written an IDL interface like this:

typedef sequence <octet> Octetseq;

interface PListener {
        void PktRecv (in  uint tvSec, in uint tvUSec, in uint Clen, 
in uint Len, in Octetseq PktData );
};

now, my implementation looks like:

.
.
.

for(;;) {
.
.
.
     Voyeur::ByteStream pd = Voyeur::ByteStream(DEFSNAPLEN);

      pd.length(DEFSNAPLEN);

      for(unsigned long t = 0; t < (DEFSNAPLEN); t++) {
              pd[t] = pkt[t];
      }

      plCurrent->PktRecv(ts.tv_sec, ts.tv_usec, clen, len, pd);
}   

but every time I run it the program crashes after few loops.

Any suggestion ?

Best Regards,
Luigi