2009-09-16 14:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbtip/sendmail.prg
    ! Fixed hang experienced in some situations when sending
      e-mail. This was reported on Linux, but was also present
      on Windows (and all OSes). It was cause by not checking
      :GetOk() return value, but looking for :cReply being NIL.
      This seems to be incorrectly coded since the very beginning,
      but surfaced only after cleaning up socket API in core.
      Please review/test, I left also old condition in.

  * utils/hbmk2/hbmk2.prg
    * Minor formatting.
This commit is contained in:
Viktor Szakats
2009-09-16 12:50:41 +00:00
parent e3c278e034
commit afb1e9b140
3 changed files with 22 additions and 5 deletions

View File

@@ -17,6 +17,19 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-16 14:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbtip/sendmail.prg
! Fixed hang experienced in some situations when sending
e-mail. This was reported on Linux, but was also present
on Windows (and all OSes). It was cause by not checking
:GetOk() return value, but looking for :cReply being NIL.
This seems to be incorrectly coded since the very beginning,
but surfaced only after cleaning up socket API in core.
Please review/test, I left also old condition in.
* utils/hbmk2/hbmk2.prg
* Minor formatting.
2009-09-16 13:30 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* examples/hbvpdf/hbvpdf.hbc
+ examples/hbvpdf/hbvpdf.hbp

View File

@@ -286,7 +286,9 @@ FUNCTION hb_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody, cSubject, aF
IF oInMail:OpenSecure()
DO WHILE .T.
oInMail:GetOk()
IF ! oInMail:GetOk()
EXIT
ENDIF
IF oInMail:cReply == NIL
EXIT
ELSEIF "LOGIN" $ oInMail:cReply
@@ -314,7 +316,7 @@ FUNCTION hb_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody, cSubject, aF
ENDIF
ELSE
IF ! lConnectPlain
oInmail:Getok()
oInmail:GetOk()
lConnect := .F.
ENDIF
ENDIF
@@ -345,7 +347,9 @@ FUNCTION hb_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody, cSubject, aF
ENDIF
DO WHILE .T.
oInMail:GetOk()
IF ! oInMail:GetOk()
EXIT
ENDIF
IF oInMail:cReply == NIL
EXIT
ENDIF

View File

@@ -2204,7 +2204,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
IF IsGTRequested( hbmk, "gtcrs" )
/* TOFIX: Sometimes 'ncur194' is needed. */
AAdd( l_aLIBSYS, IIF( hbmk[ _HBMK_cPLAT ] == "sunos", "curses", "ncurses" ) )
AAdd( l_aLIBSYS, iif( hbmk[ _HBMK_cPLAT ] == "sunos", "curses", "ncurses" ) )
ENDIF
IF IsGTRequested( hbmk, "gtsln" )
AAdd( l_aLIBSYS, "slang" )
@@ -3017,7 +3017,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
IF IsGTRequested( hbmk, "gtcrs" )
/* TOFIX: Sometimes 'ncur194' is needed. */
AAdd( l_aLIBSYS, IIF( hbmk[ _HBMK_cPLAT ] == "sunos", "curses", "ncurses" ) )
AAdd( l_aLIBSYS, iif( hbmk[ _HBMK_cPLAT ] == "sunos", "curses", "ncurses" ) )
ENDIF
IF IsGTRequested( hbmk, "gtsln" )
AAdd( l_aLIBSYS, "slang" )