-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sahan Gamage wrote:

> Hi,
>
> According to the current source as well as our design, I think we
> don't need to keep the stream in the environment. Whenever a stream
> is needed they are passed to the function explicitly. For the
> logging and error reporting requirements the log object and the
> error object in the environment can be used. So I don't see any
> logical reason behind keping the stream in the environment. For the
> places where stream is required (specially IO functions) a stream
> can be created corresponding to the desired IO mtd. (file, socket,
> byte_array .. etc).
>
> Any thoughts ?
>
> - Sahan


Hi,

I have removed the stream form the env since I didn't see any use of
it or any logic keeping it inside the env.
Pls apply the patches and commit the code.

- - Sahan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iQEVAwUBQ8HfxanIlEsDdb85AQITZggAj7xe41kJ3AMG65FJ+tnVopt1wDnUwUM/
NZ4qRjgcRMsErmDMunEkT2jAe5GyKMKH9OGvDU1E2pu7b03dGekpxUu5d6DJqwbW
Nj3lyC3qa8GJgVeKIckpTQg5zko4LTk8ap47PdeBQU9xF+BUc8jwsIbrB+0kgmdI
d1NfGl3Un3U5gPRKPd11lpX36a6eXfbmaECiHI96Fm/0wCk+IRsl/TL5q/yV0Jev
BftRrxqhxuywyZTriCSNzVtSmlPTMVfQPa1WR9YllWjmkEYEOuP6ZA0IV9xExnRf
56mrm/Jbi0R6dkZVBEZ7jq5JLqpjXciC0X/wW2Ab+F+SYVzt6rmH2Q==
=Oo/d
-----END PGP SIGNATURE-----

Index: axis2_env.h
===================================================================
--- axis2_env.h (revision 367181)
+++ axis2_env.h (working copy)
@@ -25,7 +25,6 @@
 
 #include <axis2_allocator.h>
 #include <axis2_error.h>
-#include <axis2_stream.h>
 #include <axis2_log.h>
 
 #ifdef __cplusplus
@@ -61,8 +60,6 @@
         axis2_allocator_t *allocator;
         /** Error handling */
         axis2_error_t *error;
-        /** IO routines */
-        axis2_stream_t *stream;
         /** Logging routines */
         axis2_log_t *log;
                /** This flag indicate whether logging is enabled or not */
@@ -87,10 +84,9 @@
     * it would be taken as a flag for no logging.    
     * @return pointer to the newly created environment struct 
     */
-    AXIS2_DECLARE(axis2_env_t *) axis2_env_create_with_error_stream 
+    AXIS2_DECLARE(axis2_env_t *) axis2_env_create_with_error 
                                                                                
                        (axis2_allocator_t *allocator
-                                                   , axis2_error_t *error
-                                                   , axis2_stream_t *stream);
+                                                   , axis2_error_t *error);
        
        /**
     * Creates an environment struct
@@ -101,10 +97,9 @@
     * it would be taken as a flag for no logging.    
     * @return pointer to the newly created environment struct 
     */
-    AXIS2_DECLARE(axis2_env_t *) axis2_env_create_with_error_stream_log 
+    AXIS2_DECLARE(axis2_env_t *) axis2_env_create_with_error_log 
                                                                                
                        (axis2_allocator_t *allocator
                                                    , axis2_error_t *error
-                                                   , axis2_stream_t *stream
                                                    , axis2_log_t *log);
 
   /**
Index: env.c
===================================================================
--- env.c       (revision 367181)
+++ env.c       (working copy)
@@ -22,9 +22,6 @@
 
 AXIS2_DECLARE(axis2_status_t)  axis2_env_free (axis2_env_t *env)
 {
-    if(env != NULL && env->stream != NULL && (env->stream->ops) != NULL)
-               AXIS2_STREAM_FREE(env->stream);
-
     if(NULL != env && NULL != env->log)
         AXIS2_LOG_FREE(env->log);
        
@@ -62,16 +59,16 @@
 }
 
 AXIS2_DECLARE(axis2_env_t*)
-axis2_env_create_with_error_stream (axis2_allocator_t *allocator
-                          , axis2_error_t *error, axis2_stream_t *stream)
+axis2_env_create_with_error (axis2_allocator_t *allocator
+                          , axis2_error_t *error)
 {
-       return axis2_env_create_with_error_stream_log(allocator, error
-               , stream, NULL);    
+       return axis2_env_create_with_error_log(allocator, error
+               , NULL);    
 }
 
 AXIS2_DECLARE(axis2_env_t *)
-axis2_env_create_with_error_stream_log (axis2_allocator_t *allocator
-                          , axis2_error_t *error, axis2_stream_t *stream
+axis2_env_create_with_error_log (axis2_allocator_t *allocator
+                          , axis2_error_t *error
                           , axis2_log_t *log)
 {
     axis2_env_t *environment;
@@ -91,9 +88,6 @@
         return NULL;
     environment->error = error;
 
-       if(NULL == stream)
-               return NULL;
-    environment->stream = stream;    
 
     if (NULL == log)
         environment->log_enabled = AXIS2_FALSE;

Reply via email to