Article delegate-en/866 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: FCL and select based bidirectional filter
21 Jul 2000 02:51:45 GMT (Yutaka Sato)


On 07/19/00(19:25) you "Juri Hoerner" <> wrote
in <_A865@delegate-en.ML_>
 |Hi Yutaka,
 |      if (FD_ISSET(cl, &rset))
 |         if (fgets(sendline,  MAXLINE,  clr) == NULL )

Maybe here was a lost "{" between these lines.

 |but if I start it as a FCL filter: delegated -p8021 SERVER=ftp FCL=prog
 |- I receive only the first line of  the ftp banner and the programm stoped
 |on select function (line with /* mark 1*/)...

You are using fgets(FILE) which will prefetch input data in
its buffer, but select(fileno(FILE)) will not detect the data
in the buffer.
The simplest solution is setting these FILEs be unbuffered
like this:
This is very inefficient, but could be usable for filtering
a communication with low bandwidth.

For portability and efficiency, using fPollIns() instead of
select() as in filters/bdtee.c and compiling it with
lib/lib{rary,subst}.a is recommended.

Yutaka Sato <>   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]