net: remove parse_host_src_port() function
authorJuan Quintela <quintela@redhat.com>
Thu, 24 Feb 2011 11:22:10 +0000 (12:22 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 6 Mar 2011 19:06:50 +0000 (20:06 +0100)
It was deprecated, and it has no users.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
net.c
qemu_socket.h

diff --git a/net.c b/net.c
index 436c24c59851b49f1397482c5d3bcded8c2af759..54e8992bea4e11569d8f20f59a07d75f5f529767 100644 (file)
--- a/net.c
+++ b/net.c
@@ -94,47 +94,6 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
     return 0;
 }
 
-int parse_host_src_port(struct sockaddr_in *haddr,
-                        struct sockaddr_in *saddr,
-                        const char *input_str)
-{
-    char *str = qemu_strdup(input_str);
-    char *host_str = str;
-    char *src_str;
-    const char *src_str2;
-    char *ptr;
-
-    /*
-     * Chop off any extra arguments at the end of the string which
-     * would start with a comma, then fill in the src port information
-     * if it was provided else use the "any address" and "any port".
-     */
-    if ((ptr = strchr(str,',')))
-        *ptr = '\0';
-
-    if ((src_str = strchr(input_str,'@'))) {
-        *src_str = '\0';
-        src_str++;
-    }
-
-    if (parse_host_port(haddr, host_str) < 0)
-        goto fail;
-
-    src_str2 = src_str;
-    if (!src_str || *src_str == '\0')
-        src_str2 = ":0";
-
-    if (parse_host_port(saddr, src_str2) < 0)
-        goto fail;
-
-    free(str);
-    return(0);
-
-fail:
-    free(str);
-    return -1;
-}
-
 int parse_host_port(struct sockaddr_in *saddr, const char *str)
 {
     char buf[512];
index 897a8ae50bbf72ca902a7dda4d0acf92be87a262..180e4dbd9b5bebe927fb624f8463d384bd3adc24 100644 (file)
@@ -54,9 +54,6 @@ int unix_connect(const char *path);
 
 /* Old, ipv4 only bits.  Don't use for new code. */
 int parse_host_port(struct sockaddr_in *saddr, const char *str);
-int parse_host_src_port(struct sockaddr_in *haddr,
-                        struct sockaddr_in *saddr,
-                        const char *str);
 int socket_init(void);
 
 #endif /* QEMU_SOCKET_H */