apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/memory/unix apr_sms.c
Date Fri, 29 Jun 2001 16:07:34 GMT
dreid       01/06/29 09:07:34

  Modified:    memory/unix apr_sms.c
  Log:
  Fix a bug in the cleanup code.
  Check for the APR_ALL_CLEANUPS instead of 0.
  
  Revision  Changes    Path
  1.26      +4 -3      apr/memory/unix/apr_sms.c
  
  Index: apr_sms.c
  ===================================================================
  RCS file: /home/cvs/apr/memory/unix/apr_sms.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- apr_sms.c	2001/06/20 15:52:15	1.25
  +++ apr_sms.c	2001/06/29 16:07:32	1.26
  @@ -614,7 +614,7 @@
       cleanup = sms->cleanups;
       cleanup_ref = &sms->cleanups;
       while (cleanup) {
  -        if ((type == 0 || cleanup->type == type) &&
  +        if ((type == APR_ALL_CLEANUPS || cleanup->type == type) &&
               cleanup->data == data && cleanup->cleanup_fn == cleanup_fn) {
               *cleanup_ref = cleanup->next;
   
  @@ -623,6 +623,7 @@
               if (sms->free_fn)
                   apr_sms_free(sms, cleanup);
   
  +            cleanup = *cleanup_ref;
               rv = APR_SUCCESS;
           } else {
               cleanup_ref = &cleanup->next;
  @@ -651,7 +652,7 @@
       cleanup_ref = &sms->cleanups;
       sms = sms->accounting;
       while (cleanup) {
  -        if (type == 0 || cleanup->type == type) {
  +        if (type == APR_ALL_CLEANUPS || cleanup->type == type) {
               *cleanup_ref = cleanup->next;
   
               if (sms->free_fn)
  @@ -702,7 +703,7 @@
       cleanup_ref = &sms->cleanups;
       sms = sms->accounting;
       while (cleanup) {
  -        if (type == 0 || cleanup->type == type) {
  +        if (type == APR_ALL_CLEANUPS || cleanup->type == type) {
               *cleanup_ref = cleanup->next;
   
               cleanup->cleanup_fn(cleanup->data);
  
  
  

Mime
View raw message