Switch from inet_aton() to inet_pton().
authorAndre Noll <maan@systemlinux.org>
Fri, 5 Oct 2007 18:19:43 +0000 (20:19 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 5 Oct 2007 18:19:43 +0000 (20:19 +0200)
Solaris doesn't have inet_aton().

command.c
http_send.c
ortp_send.c

index e33bae6..97924f2 100644 (file)
--- a/command.c
+++ b/command.c
@@ -220,7 +220,7 @@ static int check_sender_args(int argc, char * const * argv, struct sender_comman
        case SENDER_ALLOW:
                if (argc != 4 && argc != 5)
                        return -E_COMMAND_SYNTAX;
-               if (!inet_aton(argv[3], &scd->addr))
+               if (!inet_pton(AF_INET, argv[3], &scd->addr))
                        return -E_COMMAND_SYNTAX;
                scd->netmask = 32;
                if (argc == 5) {
@@ -233,7 +233,7 @@ static int check_sender_args(int argc, char * const * argv, struct sender_comman
        case SENDER_DELETE:
                if (argc != 4 && argc != 5)
                        return -E_COMMAND_SYNTAX;
-               if (!inet_aton(argv[3], &scd->addr))
+               if (!inet_pton(AF_INET, argv[3], &scd->addr))
                        return -E_COMMAND_SYNTAX;
                scd->port = -1;
                if (argc == 5) {
index 3f03f00..7ee3e55 100644 (file)
@@ -464,7 +464,7 @@ static void init_access_control_list(void)
                if (!p)
                        goto err;
                *p = '\0';
-               if (!inet_aton(arg, &scd.addr))
+               if (!inet_pton(AF_INET, arg, &scd.addr))
                        goto err;
                scd.netmask = atoi(++p);
                if (scd.netmask < 0 || scd.netmask > 32)
index e17c847..9095a8f 100644 (file)
@@ -289,7 +289,7 @@ static void ortp_init_target_list(void)
                if (!p)
                        goto err;
                *p = '\0';
-               if (!inet_aton(arg, &addr))
+               if (!inet_pton(AF_INET, arg, &addr))
                        goto err;
                port = atoi(++p);
                if (port < 0 || port > 65535)