cvs commit: modperl-2.0/src/modules/perl modperl_util.c

2002-01-29 Thread stas

stas02/01/29 01:50:39

  Modified:src/modules/perl modperl_util.c
  Log:
  - forgot to add that if modperl_tls_get_request_rec fails (which can only
  succeed inside request with 'PerlOptions +GlobalRequest', we retun
  modperl_global_get_pconf()
  
  Revision  ChangesPath
  1.37  +6 -2  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- modperl_util.c29 Jan 2002 05:54:20 -  1.36
  +++ modperl_util.c29 Jan 2002 09:50:39 -  1.37
  @@ -170,7 +170,11 @@
   char *classname = NULL;
   IV ptr = 0;
   
  -/* get the pool from the current request if applicable */
  +/*
  + * if inside request and 'PerlOptions +GlobalRequest' for this interp,
  + * get the pool from the current request
  + * else return the global pool
  + */
   if (obj == PL_sv_undef) {
   request_rec *r = NULL;
   (void)modperl_tls_get_request_rec(r);
  @@ -179,7 +183,7 @@
   return r-pool;
   }
   
  -return NULL;
  +return modperl_global_get_pconf();
   }
   
   if ((SvROK(obj)  (SvTYPE(SvRV(obj)) == SVt_PVMG))) {
  
  
  



cvs commit: modperl-2.0/xs/APR/String - New directory

2002-01-29 Thread stas

stas02/01/29 08:23:53

  modperl-2.0/xs/APR/String - New directory



cvs commit: modperl-2.0/xs/Apache/Connection Apache__Connection.h

2002-01-29 Thread dougm

dougm   02/01/29 08:32:25

  Modified:xs/Apache/Connection Apache__Connection.h
  Log:
  get Apache::Connection-client_socket working again
  
  Revision  ChangesPath
  1.2   +9 -0  modperl-2.0/xs/Apache/Connection/Apache__Connection.h
  
  Index: Apache__Connection.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Apache__Connection.h  19 Nov 2001 17:32:46 -  1.1
  +++ Apache__Connection.h  29 Jan 2002 16:32:25 -  1.2
  @@ -2,6 +2,8 @@
   apr_socket_t *mpxs_Apache__Connection_client_socket(pTHX_ conn_rec *c,
   apr_socket_t *s)
   {
  +/* XXX: until minds are made up */
  +#if 0
   apr_socket_t *socket =
   ap_get_module_config(c-conn_config, core_module);
   
  @@ -10,4 +12,11 @@
   }
   
   return socket;
  +#else
  +if (s) {
  +c-client_socket = s;
  +}
  +
  +return c-client_socket;
  +#endif
   }
  
  
  



cvs commit: modperl-2.0/xs/APR/String APR__String.h

2002-01-29 Thread stas

stas02/01/29 09:11:06

  Modified:xs/maps  apr_functions.map modperl_functions.map
   xs/APR/String APR__String.h
  Log:
  - use the mpxs_APR__String_strfsize and format_size as Perl API
  - adjust the map files
  
  Revision  ChangesPath
  1.31  +4 -2  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- apr_functions.map 29 Jan 2002 07:47:25 -  1.30
  +++ apr_functions.map 29 Jan 2002 17:11:06 -  1.31
  @@ -247,7 +247,7 @@
apr_lstat
apr_stat
   
  -!MODULE=APR::Strings
  +!MODULE=APR::String
apr_collapse_spaces
   -apr_cpystrn
apr_fnmatch
  @@ -260,11 +260,13 @@
apr_strnatcasecmp
apr_strnatcmp
   -apr_tokenize_to_argv
  --apr_strfsize
   -apr_strtok
   -apr_itoa
   -apr_ltoa
   -apr_off_t_toa
  +
  +MODULE=APR::String
  + SV *:apr_strfsize | mpxs_APR__String_strfsize | size | format_size
   
   !MODULE=APR::ProcAttr
apr_procattr_create
  
  
  
  1.35  +0 -4  modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- modperl_functions.map 29 Jan 2002 07:47:25 -  1.34
  +++ modperl_functions.map 29 Jan 2002 17:11:06 -  1.35
  @@ -98,7 +98,3 @@
   MODULE=Apache::SubProcess
# ap_subprocess_ won't work
modperl_spawn_proc_prog | MPXS_ | ... | spawn_proc_prog
  -
  -MODULE=APR::String
  - mpxs_APR__String_format_size
  -
  
  
  
  1.2   +1 -1  modperl-2.0/xs/APR/String/APR__String.h
  
  Index: APR__String.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/String/APR__String.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- APR__String.h 29 Jan 2002 16:24:34 -  1.1
  +++ APR__String.h 29 Jan 2002 17:11:06 -  1.2
  @@ -1,5 +1,5 @@
   static MP_INLINE
  -SV *mpxs_APR__String_format_size(pTHX_ apr_off_t  size)
  +SV *mpxs_APR__String_strfsize(pTHX_ apr_off_t size)
   {
   char buff[5];
   
  
  
  



cvs commit: modperl-2.0/xs/Apache/Time - New directory

2002-01-29 Thread stas

stas02/01/29 10:13:21

  modperl-2.0/xs/Apache/Time - New directory



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-01-29 Thread dougm

dougm   02/01/29 19:29:38

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.33  +42 -1 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- FunctionTable.pm  29 Jan 2002 05:35:34 -  1.32
  +++ FunctionTable.pm  30 Jan 2002 03:29:38 -  1.33
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Mon Jan 28 20:30:40 2002
  +# !  Tue Jan 29 19:27:23 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -1757,6 +1757,11 @@
 },
 {
   'return_type' = 'apr_array_header_t *',
  +'name' = 'ap_hook_get_install_transport_filters',
  +'args' = []
  +  },
  +  {
  +'return_type' = 'apr_array_header_t *',
   'name' = 'ap_hook_get_log_transaction',
   'args' = []
 },
  @@ -1954,6 +1959,28 @@
 },
 {
   'return_type' = 'void',
  +'name' = 'ap_hook_install_transport_filters',
  +'args' = [
  +  {
  +'type' = 'ap_HOOK_install_transport_filters_t *',
  +'name' = 'pf'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszPre'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszSucc'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'nOrder'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
   'name' = 'ap_hook_log_transaction',
   'args' = [
 {
  @@ -4121,6 +4148,20 @@
 {
   'type' = 'request_rec *',
   'name' = 'r'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'int',
  +'name' = 'ap_run_install_transport_filters',
  +'args' = [
  +  {
  +'type' = 'conn_rec *',
  +'name' = 'c'
  +  },
  +  {
  +'type' = 'apr_socket_t *',
  +'name' = 'csd'
 }
   ]
 },
  
  
  
  1.29  +34 -5 modperl-2.0/xs/tables/current/Apache/StructureTable.pm
  
  Index: StructureTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/StructureTable.pm,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- StructureTable.pm 29 Jan 2002 05:35:34 -  1.28
  +++ StructureTable.pm 30 Jan 2002 03:29:38 -  1.29
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Mon Jan 28 20:30:43 2002
  +# !  Tue Jan 29 19:27:25 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -64,6 +64,10 @@
   'elts' = []
 },
 {
  +'type' = 'ap_HOOK_install_transport_filters_t',
  +'elts' = []
  +  },
  +  {
   'type' = 'ap_HOOK_log_transaction_t',
   'elts' = []
 },
  @@ -466,6 +470,31 @@
   ]
 },
 {
  +'type' = 'ap_LINK_install_transport_filters_t',
  +'elts' = [
  +  {
  +'type' = 'ap_HOOK_install_transport_filters_t *',
  +'name' = 'pFunc'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'szName'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszPredecessors'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszSuccessors'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'nOrder'
  +  }
  +]
  +  },
  +  {
   'type' = 'ap_LINK_log_transaction_t',
   'elts' = [
 {
  @@ -2425,10 +2454,6 @@
   'name' = 'vhost_lookup_data'
 },
 {
  -'type' = 'apr_socket_t *',
  -'name' = 'client_socket'
  -  },
  -  {
   'type' = 'apr_sockaddr_t *',
   'name' = 'local_addr'
 },
  @@ -2497,6 +2522,10 @@
   'name' = 'sbh'
 }
   ]
  +  },
  +  {
  +'type' = 'core_net_rec',
  +'elts' = []
 },
 {
   'type' = 'htaccess_result',
  
  
  
  1.58  +15 -1 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- FunctionTable.pm  25 Jan 2002 04:04:12 -  1.57
  +++ FunctionTable.pm  30 Jan 2002 03:29:38 -  1.58
  

cvs commit: modperl-2.0/xs/Apache/Connection Apache__Connection.h

2002-01-29 Thread dougm

dougm   02/01/29 19:30:24

  Modified:xs/Apache/Connection Apache__Connection.h
  Log:
  conn_rec.client_socket has gone away again
  
  Revision  ChangesPath
  1.3   +0 -9  modperl-2.0/xs/Apache/Connection/Apache__Connection.h
  
  Index: Apache__Connection.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Apache__Connection.h  29 Jan 2002 16:32:25 -  1.2
  +++ Apache__Connection.h  30 Jan 2002 03:30:24 -  1.3
  @@ -2,8 +2,6 @@
   apr_socket_t *mpxs_Apache__Connection_client_socket(pTHX_ conn_rec *c,
   apr_socket_t *s)
   {
  -/* XXX: until minds are made up */
  -#if 0
   apr_socket_t *socket =
   ap_get_module_config(c-conn_config, core_module);
   
  @@ -12,11 +10,4 @@
   }
   
   return socket;
  -#else
  -if (s) {
  -c-client_socket = s;
  -}
  -
  -return c-client_socket;
  -#endif
   }
  
  
  



cvs commit: modperl-2.0/xs/APR/Util - New directory

2002-01-29 Thread stas

stas02/01/29 21:16:56

  modperl-2.0/xs/APR/Util - New directory



cvs commit: modperl-2.0/xs/maps apr_functions.map

2002-01-29 Thread stas

stas02/01/29 21:21:53

  Modified:t/protocol/TestProtocol echo_filter.pm
   xs/APR/APR apr-test
   xs/maps  apr_functions.map
  Added:   t/response/TestAPR util.pm
   xs/APR/Util APR__Util.h
  Removed: t/response/TestAPR lib.pm
   xs/APR/Lib APR__Lib.h
  Log:
  move APR::Lib = APR::Util
  
  Revision  ChangesPath
  1.4   +1 -1  modperl-2.0/t/protocol/TestProtocol/echo_filter.pm
  
  Index: echo_filter.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/protocol/TestProtocol/echo_filter.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- echo_filter.pm20 Jan 2002 18:37:05 -  1.3
  +++ echo_filter.pm30 Jan 2002 05:21:52 -  1.4
  @@ -6,7 +6,7 @@
   use APR::Brigade ();
   use APR::Const -compile = qw(SUCCESS EOF);
   use Apache::Const -compile = qw(MODE_GETLINE);
  -use APR::Lib ();
  +use APR::Util ();
   
   sub handler {
   my Apache::Connection $c = shift;
  
  
  
  1.1  modperl-2.0/t/response/TestAPR/util.pm
  
  Index: util.pm
  ===
  package TestAPR::lib;
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  use Apache::TestUtil;
  
  use APR::Util ();
  
  sub handler {
  my $r = shift;
  
  plan $r, tests = 3;
  
  my $blen = 10;
  my $bytes = APR::generate_random_bytes(10);
  ok length($bytes) == $blen;
  
  my $status = APR::password_validate(one, two);
  
  ok $status != 0;
  
  my $str= APR::strerror($status);
  
  t_debug strerror=$str\n;
  
  ok $str eq 'passwords do not match';
  
  0;
  }
  
  1;
  
  
  
  1.1  modperl-2.0/xs/APR/Util/APR__Util.h
  
  Index: APR__Util.h
  ===
  static MP_INLINE void mpxs_apr_strerror(pTHX_ SV *sv, SV *arg)
  {
  apr_status_t statcode = mp_xs_sv2_status(arg);
  char *ptr;
  mpxs_sv_grow(sv, 128-1);
  ptr = apr_strerror(statcode, SvPVX(sv), SvLEN(sv));
  mpxs_sv_cur_set(sv, strlen(ptr)); /*XXX*/
  }
  
  static MP_INLINE void mpxs_apr_generate_random_bytes(pTHX_ SV *sv, SV *arg)
  {
  int len = (int)SvIV(arg);
  mpxs_sv_grow(sv, len);
  (void)apr_generate_random_bytes(SvPVX(sv), len);
  mpxs_sv_cur_set(sv, len);
  }
  
  static XS(MPXS_apr_strerror)
  {
  dXSARGS;
  
  mpxs_usage_items_1(status_code);
  
  mpxs_set_targ(mpxs_apr_strerror, ST(0));
  }
  
  static XS(MPXS_apr_generate_random_bytes)
  {
  dXSARGS;
  
  mpxs_usage_items_1(length);
  
  mpxs_set_targ(mpxs_apr_generate_random_bytes, ST(0));
  }
  
  
  
  1.4   +1 -1  modperl-2.0/xs/APR/APR/apr-test
  
  Index: apr-test
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/APR/apr-test,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr-test  13 Sep 2001 02:39:08 -  1.3
  +++ apr-test  30 Jan 2002 05:21:52 -  1.4
  @@ -11,7 +11,7 @@
   use APR::UUID ();
   use APR::Pool ();
   use APR::Lock ();
  -use APR::Lib ();
  +use APR::Util ();
   use APR::Base64 ();
   use APR::Signal ();
   
  
  
  
  1.32  +1 -1  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- apr_functions.map 29 Jan 2002 17:11:06 -  1.31
  +++ apr_functions.map 30 Jan 2002 05:21:53 -  1.32
  @@ -407,7 +407,7 @@
apr_dso_sym
apr_dso_unload
   
  -MODULE=APR::Lib   PACKAGE=guess
  +MODULE=APR::Util   PACKAGE=guess
apr_filename_of_pathname
apr_password_get
apr_password_validate