diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 43e0d6be53..e34bf028e1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/contrib/hbtip/sendmail.prg b/harbour/contrib/hbtip/sendmail.prg index 5da642e689..86b828a18f 100644 --- a/harbour/contrib/hbtip/sendmail.prg +++ b/harbour/contrib/hbtip/sendmail.prg @@ -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 diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 11de2e6f0c..4f7cba0db9 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -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" )