On Tue, 28 Jul 2009, Francesco Saverio Giudice wrote:

Hi,

> testing httpserv with hb_Inet*() functions I get no receiving lines.
> in uhttpd.prg around line 1799 (I have added some lines for debugging) 
> where code is:
>    cRequest := ""
>    nLen     := 0
>    nRcvLen  := 1
>    nContLen := 0
>    DO WHILE /* AT( CR_LF + CR_LF, cRequest ) == 0 .AND. */ nRcvLen > 0
>       cBuf := hb_InetRecvLine( hSocket, @nRcvLen )
> I got:
> nRcvLen = -1, cBuf = NIL
>
> Is this correct ? Before I get only not empty lines.
> I realize that probably this piece of code is wrong as I don't check for 
> empty lines, but before this returns only when there was something in 
> buffer.

Looking at old hb_InetRecvLine() I see that it can return
0, NIL, "" or character buffer and current code makes the
same. Of course I can (and I think I should) change it to
always return "" or errors but it's the question why the
problem was not exploited by old code.
Looks like socket is not in blocking mode or there is sth
else exploited by recent modifications.
What is your OS?

best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to