[PATCH 11/12] build: Removed duplicated code form s3/torture

Andrzej Hajda andrzej.hajda at wp.pl
Tue Oct 9 14:59:44 MDT 2012


Signed-off-by: Andrzej Hajda <andrzej.hajda at wp.pl>
---
 source3/torture/torture.c |   32 --------------------------------
 source3/wscript_build     |    1 +
 2 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 0cca680..f952301 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -298,38 +298,6 @@ terminate_path_at_separator(char * path)
 	return NULL;
 }
 
-/*
-  parse a //server/share type UNC name
-*/
-bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
-		      char **hostname, char **sharename)
-{
-	char *p;
-
-	*hostname = *sharename = NULL;
-
-	if (strncmp(unc_name, "\\\\", 2) &&
-	    strncmp(unc_name, "//", 2)) {
-		return False;
-	}
-
-	*hostname = talloc_strdup(mem_ctx, &unc_name[2]);
-	p = terminate_path_at_separator(*hostname);
-
-	if (p && *p) {
-		*sharename = talloc_strdup(mem_ctx, p);
-		terminate_path_at_separator(*sharename);
-	}
-
-	if (*hostname && *sharename) {
-		return True;
-	}
-
-	TALLOC_FREE(*hostname);
-	TALLOC_FREE(*sharename);
-	return False;
-}
-
 static bool torture_open_connection_share(struct cli_state **c,
 				   const char *hostname, 
 				   const char *sharename)
diff --git a/source3/wscript_build b/source3/wscript_build
index c4cb3c1..4b20cb9 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1441,6 +1441,7 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
 		 NDR_OPEN_FILES
 		 idmap
                  UTIL_LSARPC
+                 LIBCLI_SMB
                  ''',
                  vars=locals())
 
-- 
1.7.9.5



More information about the samba-technical mailing list