diff options
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/config.m4 | 4 | ||||
-rw-r--r-- | ext/imap/php_imap.c | 7 | ||||
-rw-r--r-- | ext/imap/tests/imap_include.inc | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 3ad7c107d..3fcf6742d 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -198,9 +198,9 @@ if test "$PHP_IMAP" != "no"; then AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) fi - if test -r "$IMAP_DIR/c-client/c-client.a"; then + if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 - elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then + elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 fi diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index b154cb86b..d697fa791 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1270,7 +1270,6 @@ PHP_FUNCTION(imap_reopen) int mailbox_len; long options = 0, retries = 0; pils *imap_le_struct; - MAILSTREAM *imap_stream; long flags=NIL; long cl_flags=NIL; @@ -1298,12 +1297,12 @@ PHP_FUNCTION(imap_reopen) RETURN_FALSE; } - imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags); - if (imap_stream == NIL) { + imap_le_struct->imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags); + if (imap_le_struct->imap_stream == NIL) { + zend_list_delete(Z_RESVAL_P(streamind)); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't re-open stream"); RETURN_FALSE; } - imap_le_struct->imap_stream = imap_stream; RETURN_TRUE; } /* }}} */ diff --git a/ext/imap/tests/imap_include.inc b/ext/imap/tests/imap_include.inc index ed3623957..b33a10e5e 100644 --- a/ext/imap/tests/imap_include.inc +++ b/ext/imap/tests/imap_include.inc @@ -61,7 +61,7 @@ function displayOverviewFields($resp, $fields=null) { * @param string mailbox_suffix Suffix used to uniquely identify mailboxes * @param int message_count number of test msgs to be written to new mailbox * - * @return IMAP stream to new mailbox on sucesss; FALSE on failure + * @return IMAP stream to new mailbox on success; FALSE on failure */ function setup_test_mailbox($mailbox_suffix, $message_count, &$new_mailbox = null, $msg_type = "simple"){ global $server, $default_mailbox, $username, $password; |