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

ffserver: drop error counting when parsing ACL row

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-09-25 11:02:12 -07:00
parent 5c1acf0a09
commit 83411d7331

View File

@ -118,7 +118,6 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
FFServerIPAddressACL acl; FFServerIPAddressACL acl;
FFServerIPAddressACL *nacl; FFServerIPAddressACL *nacl;
FFServerIPAddressACL **naclp; FFServerIPAddressACL **naclp;
int errors = 0;
ffserver_get_arg(arg, sizeof(arg), &p); ffserver_get_arg(arg, sizeof(arg), &p);
if (av_strcasecmp(arg, "allow") == 0) if (av_strcasecmp(arg, "allow") == 0)
@ -128,7 +127,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
else { else {
fprintf(stderr, "%s:%d: ACL action '%s' should be ALLOW or DENY.\n", fprintf(stderr, "%s:%d: ACL action '%s' should be ALLOW or DENY.\n",
filename, line_num, arg); filename, line_num, arg);
errors++; goto bail;
} }
ffserver_get_arg(arg, sizeof(arg), &p); ffserver_get_arg(arg, sizeof(arg), &p);
@ -137,7 +136,7 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
fprintf(stderr, fprintf(stderr,
"%s:%d: ACL refers to invalid host or IP address '%s'\n", "%s:%d: ACL refers to invalid host or IP address '%s'\n",
filename, line_num, arg); filename, line_num, arg);
errors++; goto bail;
} else } else
acl.last = acl.first; acl.last = acl.first;
@ -148,13 +147,10 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
fprintf(stderr, fprintf(stderr,
"%s:%d: ACL refers to invalid host or IP address '%s'\n", "%s:%d: ACL refers to invalid host or IP address '%s'\n",
filename, line_num, arg); filename, line_num, arg);
errors++; goto bail;
} }
} }
if (errors)
return;
nacl = av_mallocz(sizeof(*nacl)); nacl = av_mallocz(sizeof(*nacl));
naclp = 0; naclp = 0;
@ -179,6 +175,9 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
} else } else
av_free(nacl); av_free(nacl);
bail:
return;
} }
/* add a codec and set the default parameters */ /* add a codec and set the default parameters */