1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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
This commit is contained in:
Alex Beregszaszi 2007-04-25 21:05:47 +00:00
parent 9cfacd527c
commit ad8b8abce4

View File

@ -3823,8 +3823,8 @@ static int parse_ffconfig(const char *filename)
my_http_addr.sin_port = htons(val); my_http_addr.sin_port = htons(val);
} else if (!strcasecmp(cmd, "BindAddress")) { } else if (!strcasecmp(cmd, "BindAddress")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);
if (!inet_aton(arg, &my_http_addr.sin_addr)) { if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
fprintf(stderr, "%s:%d: Invalid IP address: %s\n", fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n",
filename, line_num, arg); filename, line_num, arg);
errors++; errors++;
} }
@ -3841,8 +3841,8 @@ static int parse_ffconfig(const char *filename)
my_rtsp_addr.sin_port = htons(atoi(arg)); my_rtsp_addr.sin_port = htons(atoi(arg));
} else if (!strcasecmp(cmd, "RTSPBindAddress")) { } else if (!strcasecmp(cmd, "RTSPBindAddress")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);
if (!inet_aton(arg, &my_rtsp_addr.sin_addr)) { if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) {
fprintf(stderr, "%s:%d: Invalid IP address: %s\n", fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n",
filename, line_num, arg); filename, line_num, arg);
errors++; errors++;
} }
@ -4341,8 +4341,8 @@ static int parse_ffconfig(const char *filename)
} else if (!strcasecmp(cmd, "MulticastAddress")) { } else if (!strcasecmp(cmd, "MulticastAddress")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);
if (stream) { if (stream) {
if (!inet_aton(arg, &stream->multicast_ip)) { if (resolve_host(&stream->multicast_ip, arg) != 0) {
fprintf(stderr, "%s:%d: Invalid IP address: %s\n", fprintf(stderr, "%s:%d: Invalid host/IP address: %s\n",
filename, line_num, arg); filename, line_num, arg);
errors++; errors++;
} }