From: Andre Noll Date: Fri, 5 Oct 2007 18:19:43 +0000 (+0200) Subject: Switch from inet_aton() to inet_pton(). X-Git-Tag: v0.3.0~305 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=06e7fb50098513c14d08c82fa1579d7bd105dc5c;hp=f561ba2a444fa5ad161e5c415ee0f2f83527bda7 Switch from inet_aton() to inet_pton(). Solaris doesn't have inet_aton(). --- diff --git a/command.c b/command.c index e33bae61..97924f22 100644 --- 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) { diff --git a/http_send.c b/http_send.c index 3f03f00b..7ee3e556 100644 --- a/http_send.c +++ b/http_send.c @@ -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) diff --git a/ortp_send.c b/ortp_send.c index e17c8474..9095a8f8 100644 --- a/ortp_send.c +++ b/ortp_send.c @@ -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)