richter     2004/10/03 22:31:02

  Modified:    .        Changes.pod Embperl.pm TODO ep.h epio.c epmain.c
                        mod_embperl.c
  Log:
  flush output before cleanup
  
  Revision  Changes    Path
  1.251     +7 -1      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.250
  retrieving revision 1.251
  diff -u -r1.250 -r1.251
  --- Changes.pod       24 Aug 2004 05:15:51 -0000      1.250
  +++ Changes.pod       4 Oct 2004 05:31:02 -0000       1.251
  @@ -1,6 +1,12 @@
   =pod
   
  -=head1 2.0rc1  24. August 2004
  +=head1 2.0

  +

  +   - Flush output to client, before cleanup runs.

  +

  +

  +

  +=head1 2.0rc1  24. August 2004

   
      - Addeded configuration directive Embperl_Object_Reqpath, which allows to
        search serveral directories for the file of the initial request.
  
  
  
  1.194     +2 -2      embperl/Embperl.pm
  
  Index: Embperl.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pm,v
  retrieving revision 1.193
  retrieving revision 1.194
  diff -u -r1.193 -r1.194
  --- Embperl.pm        24 Aug 2004 05:15:51 -0000      1.193
  +++ Embperl.pm        4 Oct 2004 05:31:02 -0000       1.194
  @@ -47,7 +47,7 @@
   
   @ISA = qw(Exporter DynaLoader);
   
  -$VERSION = '2.0rc1' ;
  +$VERSION = '2.0rc2' ;
   
   
   if ($modperl  = $ENV{MOD_PERL})
  
  
  
  1.127     +1 -0      embperl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/embperl/TODO,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- TODO      16 Aug 2004 06:28:03 -0000      1.126
  +++ TODO      4 Oct 2004 05:31:02 -0000       1.127
  @@ -11,6 +11,7 @@
   
   - check memory on recompile of epl files
   
  +- flush before CLEANUP 
   
   SOLVED, need more TESTS:
   
  
  
  
  1.46      +1 -0      embperl/ep.h
  
  Index: ep.h
  ===================================================================
  RCS file: /home/cvs/embperl/ep.h,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- ep.h      16 Aug 2004 07:36:14 -0000      1.45
  +++ ep.h      4 Oct 2004 05:31:02 -0000       1.46
  @@ -330,6 +330,7 @@
   int owrite (/*i/o*/ register req * r,
                        /*in*/ const void * ptr, 
                           /*in*/ size_t size) ;
  +void oflush (/*i/o*/ register req * r) ;

   void oputc (/*i/o*/ register req * r,
                        /*in*/ char c) ;
   int oputs (/*i/o*/ register req * r,
  
  
  
  1.28      +43 -17    embperl/epio.c
  
  Index: epio.c
  ===================================================================
  RCS file: /home/cvs/embperl/epio.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- epio.c    8 Jul 2004 08:31:00 -0000       1.27
  +++ epio.c    4 Oct 2004 05:31:02 -0000       1.28
  @@ -926,30 +926,56 @@
        return size ;
        }
   
  +#if defined (APACHE)

  +    if (r -> pApacheReq && r -> Component.pOutput -> ofd == NULL)

  +        {

  +        if (n > 0)

  +            {

  +            n = ap_rwrite (ptr, n, r -> pApacheReq) ;

  +            if (r -> Component.Config.bDebug & dbgFlushOutput)

  +                ap_rflush (r -> pApacheReq) ;

  +            return n ;

  +            }

  +        else

  +            return 0 ;

  +        }

  +#endif

  +    if (n > 0 && r -> Component.pOutput -> ofd)

  +        {

  +        n = PerlIO_write (r -> Component.pOutput -> ofd, (void *)ptr, size) ;

  +

  +        if (r -> Component.Config.bDebug & dbgFlushOutput)

  +            PerlIO_flush (r -> Component.pOutput -> ofd) ;

  +        }

  +

  +    return n ;

  +    }

  +

   
  +/* ---------------------------------------------------------------------------- */

  +/*                                                                              */

  +/* flush output                                                                 */

  +/*                                                                              */

  +/* ---------------------------------------------------------------------------- */

  +

  +void oflush (/*i/o*/ register req * r)

  +

  +    {

  +    epTHX_

  +

   #if defined (APACHE)
       if (r -> pApacheReq && r -> Component.pOutput -> ofd == NULL)
           {
  -        if (n > 0)
  -            {
  -            n = ap_rwrite (ptr, n, r -> pApacheReq) ;
  -            if (r -> Component.Config.bDebug & dbgFlushOutput)
  -                ap_rflush (r -> pApacheReq) ;
  -            return n ;
  -            }
  -        else
  -            return 0 ;
  +        ap_rflush (r -> pApacheReq) ;
  +        return ;

           }
   #endif
  -    if (n > 0 && r -> Component.pOutput -> ofd)
  +    if (r -> Component.pOutput -> ofd)
           {
  -        n = PerlIO_write (r -> Component.pOutput -> ofd, (void *)ptr, size) ;
  -
  -        if (r -> Component.Config.bDebug & dbgFlushOutput)
  -            PerlIO_flush (r -> Component.pOutput -> ofd) ;
  +        PerlIO_flush (r -> Component.pOutput -> ofd) ;
           }
   
  -    return n ;
  +    return ;
       }
   
   
  
  
  
  1.133     +4 -2      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- epmain.c  24 Aug 2004 05:08:48 -0000      1.132
  +++ epmain.c  4 Oct 2004 05:31:02 -0000       1.133
  @@ -1153,7 +1153,9 @@
       if (r -> Component.Param.pOutput)
           return OutputToMem (r) ;
       
  -    return OutputToFile (r) ;
  +    rc = OutputToFile (r) ;

  +    oflush (r) ;

  +    return rc ;
       }
   
   /* ---------------------------------------------------------------------------- */
  
  
  
  1.26      +2 -2      embperl/mod_embperl.c
  
  Index: mod_embperl.c
  ===================================================================
  RCS file: /home/cvs/embperl/mod_embperl.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_embperl.c     17 Aug 2004 06:17:58 -0000      1.25
  +++ mod_embperl.c     4 Oct 2004 05:31:02 -0000       1.26
  @@ -258,7 +258,7 @@
           }
   #endif
   
  -
  +    return ok ;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to