Re: bug in php3_imap_reopen
| From: | Mark Musone | Date: | Wed, 11 Aug 1999 20:15:23 +0000 |
| Subject: | Re: bug in php3_imap_reopen | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9759@lists.php.net to get a copy of this message | ||
this should be a cause of the problem..
mail_open simply returns the ame stream if you pasin a stream..
are you using php3 or php4?
can you give me a backtrace too?
Mark
>
> Hi all
>
> I got some seg faults using php3_imap_reopen. The last lines of the
> function are:
>
> imap_stream = mail_open(imap_le_struct->imap_stream, mailbox->value.str.val, flags);
> if (imap_stream == NIL) {
> php3_error(E_WARNING,"Couldn't re-open stream\n");
> RETURN_FALSE;
> }
> RETURN_TRUE;
> }
>
> It seems to me that mail_open frees the imap_le_struct->imap_stream that
> it gets as an argument, and returns a new one. But the PHP code ignores
> the new value and reuses the old one. I think a possible fix is to add a
> line, so that it looks like this:
>
> imap_stream = mail_open(imap_le_struct->imap_stream, mailbox->value.str.val, flags);
> if (imap_stream == NIL) {
> php3_error(E_WARNING,"Couldn't re-open stream\n");
> RETURN_FALSE;
> }
> imap_le_struct->imap_stream = imap_stream;
> RETURN_TRUE;
> }
>
> Stig
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>