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

From: Date: Wed, 31 Jul 2002 01:03:32 +0000
Subject: cvs: php4 /ext/imap php_imap.c php_imap.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13058@lists.php.net to get a copy of this message
kalowsky Tue Jul 30 21:03:32 2002 EDT Modified files: /php4/ext/imap php_imap.c php_imap.h Log: removing the useless +1's on sizeof() and adding the mail_parameter for the getquot inside the imap_get_quotaroot function. thank Jani. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.130 php4/ext/imap/php_imap.c:1.131 --- php4/ext/imap/php_imap.c:1.130 Tue Jul 30 19:16:11 2002 +++ php4/ext/imap/php_imap.c Tue Jul 30 21:03:31 2002 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.130 2002/07/30 23:16:11 kalowsky Exp $ */ +/* $Id: php_imap.c,v 1.131 2002/07/31 01:03:31 kalowsky Exp $ */ #define IMAP41 @@ -391,8 +391,8 @@ return; } - add_assoc_long_ex(t_map, "usage", sizeof("usage")+1, qlist->usage); - add_assoc_long_ex(t_map, "limit", sizeof("limit")+1, 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); } } @@ -408,9 +408,9 @@ { TSRMLS_FETCH(); - add_next_index_stringl(IMAPG(quota_return), mbx, strlen(mbx)+1, 1); + add_next_index_stringl(IMAPG(quota_return), mbx, strlen(mbx), 1); for(; qroot; qroot = qroot->next) { - add_next_index_stringl(IMAPG(quota_return), qroot->text.data, qroot->text.size+1, 1); + add_next_index_stringl(IMAPG(quota_return), qroot->text.data, qroot->text.size, 1); } } @@ -442,7 +442,6 @@ imap_globals->folderlist_style = FLIST_ARRAY; #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) imap_globals->quota_return = NULL; - imap_globals->quotaroot_return = NULL; #endif } /* }}} */ @@ -1093,9 +1092,7 @@ } *return_value = *IMAPG(quota_return); - //FREE_ZVAL(IMAPG(quota_return)); - //IMAPG(quota_return) = NULL; - + FREE_ZVAL(IMAPG(quota_return)); } /* }}} */ @@ -1122,15 +1119,15 @@ } /* set the callback for the GET_QUOTAROOT function */ + mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); mail_parameters(NIL, SET_QUOTAROOT, (void *) mail_getquotaroot); if(!imap_getquotaroot(imap_le_struct->imap_stream, Z_STRVAL_PP(mbox))) { - php_error(E_WARNING, "c-client imap_getquotaroot failed"); + php_error(E_WARNING, "%s(): c-client imap_getquotaroot failed", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } *return_value = *IMAPG(quota_return); - //FREE_ZVAL(IMAPG(quota_return)); - //IMAPG(quotaroot_return) = NULL; + FREE_ZVAL(IMAPG(quota_return)); } /* }}} */ Index: php4/ext/imap/php_imap.h diff -u php4/ext/imap/php_imap.h:1.21 php4/ext/imap/php_imap.h:1.22 --- php4/ext/imap/php_imap.h:1.21 Fri Jul 26 12:26:01 2002 +++ php4/ext/imap/php_imap.h Tue Jul 30 21:03:31 2002 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_imap.h,v 1.21 2002/07/26 16:26:01 kalowsky Exp $ */ +/* $Id: php_imap.h,v 1.22 2002/07/31 01:03:31 kalowsky Exp $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H @@ -211,7 +211,6 @@ unsigned long status_uidvalidity; #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) zval *quota_return; - zval *quotaroot_return; #endif ZEND_END_MODULE_GLOBALS(imap)

« previous php.cvs (#13058) next »