summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/SAPI.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 006789a474..11e92e8e01 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -378,13 +378,15 @@ SAPI_API int sapi_flush()
if (sapi_module.flush) {
SLS_FETCH();
- sapi_module.flush(SG(server_context));
- return SUCCESS;
- } else {
- return FAILURE;
+ if (SG(server_context)) {
+ sapi_module.flush(SG(server_context));
+ return SUCCESS;
+ }
}
+ return FAILURE;
}
+
SAPI_API struct stat *sapi_get_stat()
{
SLS_FETCH();