From 16f053f7f5fd6bd1fc69cab55676466322fa7a39 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 5 Oct 2010 22:01:34 -0700 Subject: [PATCH] addr_parsing: remove unused mount_path logic This was breaking parsing if any of the hosts included a ":port" too. Signed-off-by: Sage Weil --- src/include/addr_parsing.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/include/addr_parsing.h b/src/include/addr_parsing.h index f70daf8d7484f..b82efb701d203 100644 --- a/src/include/addr_parsing.h +++ b/src/include/addr_parsing.h @@ -33,21 +33,9 @@ static int safe_cat(char **pstr, int *plen, int pos, const char *str2) char *mount_resolve_dest(char *orig_str) { char *new_str; - char *mount_path; char *tok, *p, *port_str; int len, pos; - mount_path = strrchr(orig_str, ':'); - if (mount_path == orig_str) { - printf("server address expected\n"); - return NULL; - } - - if (mount_path) { - *mount_path = '\0'; - mount_path++; - } - len = BUF_SIZE; new_str = (char *)malloc(len); @@ -136,11 +124,6 @@ char *mount_resolve_dest(char *orig_str) } - if (mount_path) { - pos = safe_cat(&new_str, &len, pos, ":"); - pos = safe_cat(&new_str, &len, pos, mount_path); - } - //printf("new_str is '%s'\n", new_str); return new_str; } -- 2.39.5