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

From: Date: Tue, 17 Oct 2000 16:37:31 +0000
Subject: Re: cvs: php4 /ext/imap php_imap.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2100@lists.php.net to get a copy of this message
Forget this mail..I'm being idiot..and you were right. --Jani On Tue, 17 Oct 2000, Jani Taskinen wrote: > >Please revert this commit and read the whole source first. > >---cut--- >if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_UID)) { > msgindex = mail_msgno(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)); >} else { > msgindex = Z_LVAL_PP(msgno); >} >---cut--- > >That is before imap_fetchstructure() call. > >--Jani > >On Tue, 17 Oct 2000, Chuck Hagenbuch wrote: > >>chagenbu Tue Oct 17 09:11:26 2000 EDT >> >> Modified files: >> /php4/ext/imap php_imap.c >> Log: >> fix imap_fetchstructure(). msgindex is not valid if we're using FT_UID; >> always use Z_LVAL_PP(msgno) in the actual c-client function call. >> >> >>Index: php4/ext/imap/php_imap.c >>diff -u php4/ext/imap/php_imap.c:1.46 php4/ext/imap/php_imap.c:1.47 >>--- php4/ext/imap/php_imap.c:1.46 Tue Oct 17 08:42:05 2000 >>+++ php4/ext/imap/php_imap.c Tue Oct 17 09:11:26 2000 >>@@ -25,7 +25,7 @@ >> | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | >> +----------------------------------------------------------------------+ >> */ >>-/* $Id: php_imap.c,v 1.46 2000/10/17 15:42:05 sniper Exp $ */ >>+/* $Id: php_imap.c,v 1.47 2000/10/17 16:11:26 chagenbu Exp $ */ >> >> #define IMAP41 >> >>@@ -1904,16 +1904,16 @@ >> convert_to_long_ex(flags); >> } >> object_init(return_value); >>- >>+ >> ind = Z_LVAL_PP(streamind); >>- >>+ >> imap_le_struct = (pils *) zend_list_find(ind, &ind_type); >>- >>+ >> if (!imap_le_struct || !IS_STREAM(ind_type)) { >> php_error(E_WARNING, "Unable to find stream pointer"); >> RETURN_FALSE; >> } >>- >>+ >> if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_UID)) { >> /* This should be cached; if it causes an extra RTT to the >> IMAP server, then that's the price we pay for making sure >>@@ -1926,8 +1926,8 @@ >> php_error(E_WARNING, "Bad message number"); >> RETURN_FALSE; >> } >>- >>- mail_fetchstructure_full(imap_le_struct->imap_stream, msgindex, &body ,myargc == 3 >>? Z_LVAL_PP(flags) : NIL); >>+ >>+ mail_fetchstructure_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &body >>,myargc == 3 ? Z_LVAL_PP(flags) : NIL); >> >> if (!body) { >> php_error(E_WARNING, "No body information available"); >> >> >> >> > > -- Joo.

« previous php.cvs (#2100) next »