[SCM] Socket Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Sat Feb 1 06:31:26 MST 2014


The branch, master has been updated
       via  b136de0 src: Add a public socket_wrapper_enabled() function.
      from  81ece35 src: Fix va arg passing in open().

http://gitweb.samba.org/?p=socket_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b136de00e4ac63d2d5359782912c89ebf073cbf1
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Fri Jan 31 16:59:36 2014 +0100

    src: Add a public socket_wrapper_enabled() function.
    
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 src/socket_wrapper.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 6e38f32..c5b1fdf 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -221,6 +221,7 @@ struct socket_info *sockets;
 
 /* Function prototypes */
 
+bool socket_wrapper_enabled(void);
 void swrap_destructor(void) DESTRUCTOR_ATTRIBUTE;
 
 #ifdef NDEBUG
@@ -806,6 +807,13 @@ static const char *socket_wrapper_dir(void)
 	return s;
 }
 
+bool socket_wrapper_enabled(void)
+{
+	const char *s = socket_wrapper_dir();
+
+	return s != NULL ? true : false;
+}
+
 static unsigned int socket_wrapper_default_iface(void)
 {
 	const char *s = getenv("SOCKET_WRAPPER_DEFAULT_IFACE");
@@ -2063,7 +2071,7 @@ static int swrap_socket(int family, int type, int protocol)
 	real_type &= ~SOCK_NONBLOCK;
 #endif
 
-	if (socket_wrapper_dir() == NULL) {
+	if (!socket_wrapper_enabled()) {
 		return libc_socket(family, type, protocol);
 	}
 


-- 
Socket Wrapper Repository


More information about the samba-cvs mailing list