Hi,

Il 28/07/2009 18.27, Przemyslaw Czerpak ha scritto:
Thanks, please try after:
   2009-07-28 18:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)


The error is still there, but I need to make a deep check.
Now I downloading your last update to check again.

It should work as before anyhow we should think about modifying
hb_InetRecvLine() to return "" on errors. The next problem with
this function is values stored in 2-nd parameter passed by reference.
Documentation says that it should be length of line with EOL terminator
when in fact it isn't and I do not know what I should make with it.
I can change it to work line in documentation but I can also keep
current behavior and set negative values on errors. In such case we
will have to update documentation.
Opinions?


As I can see in original inet.c, and if I don't read wrongly, iLen (that is @nResult var) it is the length of received string or 0 or error, but in case of length of the string it will contains also "\r\n" length. Instead iPos is used to search and return the length of the string without pattern. So it seems to me that on this point docs are correct also if not reports -2 as possible error (timeout). I suppose that Giancarlo uses NIL as return string in case of error to use function without checking nResult. An empty string forces to check always nResult.

Best regards,
Francesco
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to