]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
addr_parsing: remove unused mount_path logic
authorSage Weil <sage@newdream.net>
Wed, 6 Oct 2010 05:01:34 +0000 (22:01 -0700)
committerSage Weil <sage@newdream.net>
Wed, 6 Oct 2010 05:01:34 +0000 (22:01 -0700)
This was breaking parsing if any of the hosts included a ":port" too.

Signed-off-by: Sage Weil <sage@newdream.net>
src/include/addr_parsing.h

index f70daf8d7484f5c917e4af4ead12466ce94c58d5..b82efb701d203005d0ef9d98962ae20f7f877f2b 100644 (file)
@@ -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;
 }