diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-04-25 21:05:47 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-04-25 21:05:47 +0000 |
commit | ad8b8abce401962932442a93d371d684004bf6b0 (patch) | |
tree | 4e3e2db4461828677cbb09d97d704fbc480a206c | |
parent | 9cfacd527c3c69a0f3f079be05346e43e47ef47a (diff) | |
download | ffmpeg-ad8b8abce401962932442a93d371d684004bf6b0.tar.gz |
support for hostnames instead ip addresses in ffserver conf (using resolve_host now)
Originally committed as revision 8815 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffserver.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ffserver.c b/ffserver.c index 21292f9540..2660f2993a 100644 --- a/ffserver.c +++ b/ffserver.c @@ -3823,8 +3823,8 @@ static int parse_ffconfig(const char *filename) my_http_addr.sin_port = htons(val); } else if (!strcasecmp(cmd, "BindAddress")) { get_arg(arg, sizeof(arg), &p); - if (!inet_aton(arg, &my_http_addr.sin_addr)) { - fprintf(stderr, "%s:%d: Invalid IP address: %s\n", + if (resolve_host(&my_http_addr.sin_addr, arg) != 0) { + fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n", filename, line_num, arg); errors++; } @@ -3841,8 +3841,8 @@ static int parse_ffconfig(const char *filename) my_rtsp_addr.sin_port = htons(atoi(arg)); } else if (!strcasecmp(cmd, "RTSPBindAddress")) { get_arg(arg, sizeof(arg), &p); - if (!inet_aton(arg, &my_rtsp_addr.sin_addr)) { - fprintf(stderr, "%s:%d: Invalid IP address: %s\n", + if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) { + fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n", filename, line_num, arg); errors++; } @@ -4341,8 +4341,8 @@ static int parse_ffconfig(const char *filename) } else if (!strcasecmp(cmd, "MulticastAddress")) { get_arg(arg, sizeof(arg), &p); if (stream) { - if (!inet_aton(arg, &stream->multicast_ip)) { - fprintf(stderr, "%s:%d: Invalid IP address: %s\n", + if (resolve_host(&stream->multicast_ip, arg) != 0) { + fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n", filename, line_num, arg); errors++; } |