I'd prefer to avoid introducing new functionality into 5.2 at this point.


Ilia Alshanetsky




On 25-Apr-09, at 11:14 AM, Pierre Joye wrote:

hi Jani,

Yes, I will MFH it as well.

I also like to add mail_gc to 5.2 (coming to 5.3+) to allow one to
purge the cache while processing a large amount of mails (or large
mail) without having to call mail_close. But have to ask Ilia first :)

Cheers,

On Sat, Apr 25, 2009 at 5:11 PM, Jani Taskinen <jani.taski...@sci.fi> wrote:

Isn't this necessary in PHP_5_2? Sounds like a bug fix to me..

--Jani


Pierre-Alain Joye kirjoitti:

pajoye          Sat Apr 25 15:02:36 2009 UTC

 Modified files:              (Branch: PHP_5_3)
   /php-src/ext/imap   php_imap.c  Log:
 - MFH:  SEARCHPGM struct has to be freed

 
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.34&r2=1.208.2.7.2.26.2.35&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.34
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.35
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.34     Sat Apr 25
14:59:21 2009
+++ php-src/ext/imap/php_imap.c Sat Apr 25 15:02:36 2009
@@ -26,7 +26,7 @@
   | PHP 4.0 updates:  Zeev Suraski <z...@zend.com>
|

+ ----------------------------------------------------------------------+
 */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.34 2009/04/25 14:59:21 pajoye Exp $
*/
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.35 2009/04/25 15:02:36 pajoye Exp $
*/
  #define IMAP41
 @@ -3902,6 +3902,7 @@
       char *search_criteria;
       MESSAGELIST *cur;
       int argc = ZEND_NUM_ARGS();
+       SEARCHPGM *pgm = NIL;
if (zend_parse_parameters(argc TSRMLS_CC, "rs|ls", &streamind, &criteria, &criteria_len, &flags, &charset, &charset_len) == FAILURE) {
               return;
@@ -3912,7 +3913,14 @@
       search_criteria = estrndup(criteria, criteria_len);

       IMAPG(imap_messages) = IMAPG(imap_messages_tail) = NIL;
- mail_search_full(imap_le_struct->imap_stream, (argc == 4 ? charset
: NIL), mail_criteria(search_criteria), flags);
+       pgm = mail_criteria(search_criteria);
+
+ mail_search_full(imap_le_struct->imap_stream, (argc == 4 ? charset
: NIL), pgm, flags);
+
+       if (pgm) {
+               mail_free_searchpgm(&pgm);
+       }
+
       if (IMAPG(imap_messages) == NIL) {
               efree(search_criteria);
               RETURN_FALSE;
@@ -4518,6 +4526,7 @@
       char criteria[] = "ALL";
       THREADNODE *top;
       int argc = ZEND_NUM_ARGS();
+       SEARCHPGM *pgm = NIL;
if (zend_parse_parameters(argc TSRMLS_CC, "r|l", &streamind,
&flags) == FAILURE) {
               return;
@@ -4525,7 +4534,11 @@

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, &streamind, -1, "imap",
le_imap);

- top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL,
mail_criteria(criteria), flags);
+       pgm = mail_criteria(criteria);
+ top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL,
pgm, flags);
+       if (pgm) {
+               mail_free_searchpgm(&pgm);
+       }
         if(top == NIL) {
               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function
returned an empty tree");





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





--
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



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

Reply via email to