pollita         Thu Apr 13 04:41:09 2006 UTC

  Modified files:              
    /php-src/main/streams       php_stream_filter_api.h filter.c 
    /php-src/ext/standard       streamsfuncs.c 
  Log:
  Preserve full name of filter for use in stream_get_meta_data()
  
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/php_stream_filter_api.h?r1=1.18&r2=1.19&diff_format=u
Index: php-src/main/streams/php_stream_filter_api.h
diff -u php-src/main/streams/php_stream_filter_api.h:1.18 
php-src/main/streams/php_stream_filter_api.h:1.19
--- php-src/main/streams/php_stream_filter_api.h:1.18   Wed Apr 12 22:40:56 2006
+++ php-src/main/streams/php_stream_filter_api.h        Thu Apr 13 04:41:08 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_stream_filter_api.h,v 1.18 2006/04/12 22:40:56 pollita Exp $ */
+/* $Id: php_stream_filter_api.h,v 1.19 2006/04/13 04:41:08 pollita Exp $ */
 
 /* The filter API works on the principle of "Bucket-Brigades".  This is
  * partially inspired by the Apache 2 method of doing things, although
@@ -145,6 +145,8 @@
        /* filters are auto_registered when they're applied */
        int rsrc_id;
        int flags;
+
+       char *name;
 };
 
 /* stack filter onto a stream */
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/filter.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.29 php-src/main/streams/filter.c:1.30
--- php-src/main/streams/filter.c:1.29  Wed Apr 12 22:40:56 2006
+++ php-src/main/streams/filter.c       Thu Apr 13 04:41:08 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: filter.c,v 1.29 2006/04/12 22:40:56 pollita Exp $ */
+/* $Id: filter.c,v 1.30 2006/04/13 04:41:08 pollita Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -343,6 +343,8 @@
                else
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to 
create or locate filter \"%s\"", filtername);
        }
+
+       filter->name = pestrdup(filtername, filter->is_persistent);
        
        return filter;
 }
@@ -365,6 +367,7 @@
 {
        if (filter->fops->dtor)
                filter->fops->dtor(filter TSRMLS_CC);
+       pefree(filter->name, filter->is_persistent);
        pefree(filter, filter->is_persistent);
 }
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.74&r2=1.75&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.74 
php-src/ext/standard/streamsfuncs.c:1.75
--- php-src/ext/standard/streamsfuncs.c:1.74    Mon Apr  3 09:14:50 2006
+++ php-src/ext/standard/streamsfuncs.c Thu Apr 13 04:41:08 2006
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.74 2006/04/03 09:14:50 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.75 2006/04/13 04:41:08 pollita Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -470,7 +470,7 @@
                array_init(newval);
                
                for (filter = stream->readfilters.head; filter != NULL; filter 
= filter->next) {
-                       add_next_index_string(newval, (char 
*)filter->fops->label, 1);
+                       add_next_index_string(newval, filter->name, 1);
                }
 
                add_assoc_zval(return_value, "read_filters", newval);
@@ -483,7 +483,7 @@
                array_init(newval);
                
                for (filter = stream->writefilters.head; filter != NULL; filter 
= filter->next) {
-                       add_next_index_string(newval, (char 
*)filter->fops->label, 1);
+                       add_next_index_string(newval, filter->name, 1);
                }
 
                add_assoc_zval(return_value, "write_filters", newval);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to