perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_handler.c modperl_mgv.c modperl_mgv.h
Date Fri, 06 Dec 2002 07:58:22 GMT
stas        2002/12/05 23:58:22

  Modified:    src/modules/perl modperl_handler.c modperl_mgv.c
                        modperl_mgv.h
  Log:
  add to modperl_mgv_resolve a new 'logfailure' flag, so in case the
  resolution is failed the error won't be logged twice, if the caller
  already does that (which is the case with modperl_handler_resolve)
  
  Revision  Changes    Path
  1.14      +2 -2      modperl-2.0/src/modules/perl/modperl_handler.c
  
  Index: modperl_handler.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_handler.c	7 Oct 2002 15:45:52 -0000	1.13
  +++ modperl_handler.c	6 Dec 2002 07:58:21 -0000	1.14
  @@ -58,7 +58,7 @@
                      duped ? "current" : "server conf",
                      (unsigned long)rp);
   
  -        if (!modperl_mgv_resolve(aTHX_ handler, rp, handler->name)) {
  +        if (!modperl_mgv_resolve(aTHX_ handler, rp, handler->name, FALSE)) {
               ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, 
                            "failed to resolve handler `%s'",
                            handler->name);
  @@ -364,7 +364,7 @@
                   handler = handlers[i];
               }
   
  -            if (!modperl_mgv_resolve(aTHX_ handler, p, handler->name)) {
  +            if (!modperl_mgv_resolve(aTHX_ handler, p, handler->name, TRUE)) {
                   MP_TRACE_h(MP_FUNC, "failed to resolve handler %s\n",
                              handler->name);
               }
  
  
  
  1.19      +7 -5      modperl-2.0/src/modules/perl/modperl_mgv.c
  
  Index: modperl_mgv.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- modperl_mgv.c	29 Aug 2002 04:07:41 -0000	1.18
  +++ modperl_mgv.c	6 Dec 2002 07:58:22 -0000	1.19
  @@ -182,7 +182,7 @@
   #endif
   
   int modperl_mgv_resolve(pTHX_ modperl_handler_t *handler,
  -                        apr_pool_t *p, const char *name)
  +                        apr_pool_t *p, const char *name, int logfailure)
   {
       CV *cv;
       GV *gv;
  @@ -292,8 +292,10 @@
                   if (errlen) {
                       sv_setpvn(ERRSV, errpv, errlen);
                   }
  -                (void)modperl_errsv(aTHX_ HTTP_INTERNAL_SERVER_ERROR,
  -                                    NULL, NULL);
  +                if (logfailure) {
  +                    (void)modperl_errsv(aTHX_ HTTP_INTERNAL_SERVER_ERROR,
  +                                        NULL, NULL);
  +                }
                   MP_TRACE_h(MP_FUNC, "failed to load %s package\n", name);
                   return 0;
               }
  @@ -320,7 +322,7 @@
                      MpHandlerMETHOD(handler) ? "method" : "function");
           return 1;
       }
  -    
  +
       MP_TRACE_h(MP_FUNC, "`%s' not found in class `%s'\n",
                  handler_name, name);
   
  @@ -424,7 +426,7 @@
                   MpHandlerAUTOLOAD_On(handler);
               }
   
  -            modperl_mgv_resolve(aTHX_ handler, p, handler->name);
  +            modperl_mgv_resolve(aTHX_ handler, p, handler->name, TRUE);
           }
       }
   }
  
  
  
  1.6       +1 -1      modperl-2.0/src/modules/perl/modperl_mgv.h
  
  Index: modperl_mgv.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- modperl_mgv.h	29 Aug 2002 04:07:41 -0000	1.5
  +++ modperl_mgv.h	6 Dec 2002 07:58:22 -0000	1.6
  @@ -16,7 +16,7 @@
                                   server_rec *s, apr_pool_t *p);
   
   int modperl_mgv_resolve(pTHX_ modperl_handler_t *handler,
  -                        apr_pool_t *p, const char *name);
  +                        apr_pool_t *p, const char *name, int logfailure);
   
   void modperl_mgv_append(pTHX_ apr_pool_t *p, modperl_mgv_t *symbol,
                           const char *name);
  
  
  

Mime
View raw message