[FFmpeg-cvslog] ffserver: drop error counting when parsing ACL row

Reynaldo H. Verdejo Pinochet git at videolan.org
Sat Sep 26 02:18:22 CEST 2015


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Fri Sep 25 11:02:12 2015 -0700| [83411d73313e4c5a3438e814d8f49287d726a15c] | committer: Reynaldo H. Verdejo Pinochet

ffserver: drop error counting when parsing ACL row

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83411d73313e4c5a3438e814d8f49287d726a15c
---

 ffserver_config.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

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



More information about the ffmpeg-cvslog mailing list