cvs: php4 /ext/imap php_imap.c php_imap.h

From: Date: Mon, 20 Jan 2003 21:28:10 +0000
Subject: cvs: php4 /ext/imap php_imap.c php_imap.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-18054@lists.php.net to get a copy of this message
iliaa Mon Jan 20 16:28:10 2003 EDT Modified files: /php4/ext/imap php_imap.c php_imap.h Log: quota function fixes. Thanks Wez. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.153 php4/ext/imap/php_imap.c:1.154 --- php4/ext/imap/php_imap.c:1.153 Mon Jan 20 14:41:58 2003 +++ php4/ext/imap/php_imap.c Mon Jan 20 16:28:09 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.153 2003/01/20 19:41:58 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.154 2003/01/20 21:28:09 iliaa Exp $ */ #define IMAP41 @@ -338,8 +338,11 @@ */ void mail_getquota(MAILSTREAM *stream, char *qroot, QUOTALIST *qlist) { - zval *t_map; + zval *t_map, *return_value; TSRMLS_FETCH(); + + return_value = *IMAPG(quota_return); + /* put parsing code here */ for(; qlist; qlist = qlist->next) { MAKE_STD_ZVAL(t_map); @@ -347,13 +350,13 @@ if (strncmp(qlist->name, "STORAGE", 7) == 0) { /* this is to add backwards compatibility */ - add_assoc_long_ex(IMAPG(quota_return), "usage", sizeof("usage"), qlist->usage); - add_assoc_long_ex(IMAPG(quota_return), "limit", sizeof("limit"), qlist->limit); + add_assoc_long_ex(return_value, "usage", sizeof("usage"), qlist->usage); + add_assoc_long_ex(return_value, "limit", sizeof("limit"), qlist->limit); } add_assoc_long_ex(t_map, "usage", sizeof("usage"), qlist->usage); add_assoc_long_ex(t_map, "limit", sizeof("limit"), qlist->limit); - add_assoc_zval_ex(IMAPG(quota_return), qlist->name, strlen(qlist->name)+1, t_map); + add_assoc_zval_ex(return_value, qlist->name, strlen(qlist->name)+1, t_map); } } /* }}} */ @@ -858,7 +861,7 @@ convert_to_string_ex(qroot); array_init(return_value); - *IMAPG(quota_return) = *return_value; + IMAPG(quota_return) = &return_value; /* set the callback for the GET_QUOTA function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); @@ -886,7 +889,7 @@ convert_to_string_ex(mbox); array_init(return_value); - *IMAPG(quota_return) = *return_value; + IMAPG(quota_return) = &return_value; /* set the callback for the GET_QUOTAROOT function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); Index: php4/ext/imap/php_imap.h diff -u php4/ext/imap/php_imap.h:1.26 php4/ext/imap/php_imap.h:1.27 --- php4/ext/imap/php_imap.h:1.26 Tue Dec 31 11:06:45 2002 +++ php4/ext/imap/php_imap.h Mon Jan 20 16:28:09 2003 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_imap.h,v 1.26 2002/12/31 16:06:45 sebastian Exp $ */ +/* $Id: php_imap.h,v 1.27 2003/01/20 21:28:09 iliaa Exp $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H @@ -200,7 +200,7 @@ unsigned long status_uidnext; unsigned long status_uidvalidity; #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) - zval *quota_return; + zval **quota_return; #endif ZEND_END_MODULE_GLOBALS(imap)

« previous php.cvs (#18054) next »