>Number:         3629
>Category:       other
>Synopsis:       ISAPI function call return status code check for mod_isapi
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Jan  6 07:10:00 PST 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.3
>Environment:
I am running Windows NT first build no patches applied.  I am making ISAPI
code with Delphi version 3.0 with all the latest patches applied.
>Description:
The return status code checks in mod_isapi for the ISAPI dll calls look like:

 if ((*isapi_version)(pVer) != TRUE) {

When I try to run my isapi server extensions I get error 500 page back.  
Apparently
Delphi (and I would assume other languages) don't always define TRUE to be 
!FALSE
where FALSE is 0 (this is how the Apache code defines it if FALSE is not already
defined).
>How-To-Repeat:
Make a ISAPI project with Delphi and try to run the server extensions.
>Fix:
Change the code to read:

 if ((*isapi_version)(pVer) == FALSE) {

or

 if (!(*isapi_version)(pVer)) {

isn't this a safer way to check the results of a boolean expression instead of
checking that it is equall to TRUE?

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]



Reply via email to