httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jac...@apache.org
Subject cvs commit: httpd-test/flood flood_round_robin.c
Date Fri, 06 Sep 2002 09:42:56 GMT
jacekp      2002/09/06 02:42:56

  Modified:    flood    flood_round_robin.c
  Log:
  Check for regexp failure and print nice error message
  
  Revision  Changes    Path
  1.28      +4 -1      httpd-test/flood/flood_round_robin.c
  
  Index: flood_round_robin.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_round_robin.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- flood_round_robin.c	6 Sep 2002 09:35:55 -0000	1.27
  +++ flood_round_robin.c	6 Sep 2002 09:42:56 -0000	1.28
  @@ -877,7 +877,10 @@
           regcomp(&re, expanded, REG_EXTENDED);
           status = regexec(&re, resp->rbuf, 10, match, 0);
   
  -        assert(status == REG_OK);
  +        if (status != REG_OK) {
  +            apr_file_printf(local_stderr, "Regular expression match failed (%s)\n", rp->url[rp->current_url].responsetemplate);
  +            return APR_EGENERAL;
  +	}
   
           size = match[1].rm_eo - match[1].rm_so + 1;
           newValue = apr_palloc(rp->pool, size);
  
  
  

Mime
View raw message