You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sh...@apache.org on 2009/08/13 09:37:33 UTC

svn commit: r803801 - /webservices/axis2/trunk/c/util/src/file_handler.c

Author: shankar
Date: Thu Aug 13 07:37:33 2009
New Revision: 803801

URL: http://svn.apache.org/viewvc?rev=803801&view=rev
Log:
fixing file handler close return value 

Modified:
    webservices/axis2/trunk/c/util/src/file_handler.c

Modified: webservices/axis2/trunk/c/util/src/file_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/file_handler.c?rev=803801&r1=803800&r2=803801&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/file_handler.c (original)
+++ webservices/axis2/trunk/c/util/src/file_handler.c Thu Aug 13 07:37:33 2009
@@ -44,9 +44,19 @@
 axutil_file_handler_close(
     void *file_ptr)
 {
+    int status = 0;
+
     if (!file_ptr)
-        return -1;
-    return (axis2_status_t) fclose(file_ptr);
+        return AXIS2_FAILURE;
+
+    status = fclose(file_ptr);
+
+    /*if successfully closed, it will return 0. otherwise EOF is returned */
+    if(status != 0)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL