diff options
author | Derick Rethans <github@derickrethans.nl> | 2014-01-02 10:57:46 +0000 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2014-01-02 10:57:46 +0000 |
commit | dee77f237c7989359986f5020d450c1b9a93464c (patch) | |
tree | 0b8de5050f07364b3fcb03fa420686505947dc79 /ext | |
parent | e881334e496be92ac6d1751f25d006203f3229d6 (diff) | |
parent | 3c3ff434329d2f505b00a79bacfdef95ca96f0d2 (diff) | |
download | php-git-dee77f237c7989359986f5020d450c1b9a93464c.tar.gz |
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ftp/ftp.c | 4 | ||||
-rw-r--r-- | ext/ftp/php_ftp.c | 4 | ||||
-rw-r--r-- | ext/pdo_odbc/odbc_stmt.c | 3 | ||||
-rw-r--r-- | ext/snmp/snmp.c | 6 |
4 files changed, 16 insertions, 1 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index b82017e21f..fce9ecf841 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -178,6 +178,10 @@ ftp_close(ftpbuf_t *ftp) if (ftp->data) { data_close(ftp, ftp->data); } + if (ftp->stream && ftp->closestream) { + TSRMLS_FETCH(); + php_stream_close(ftp->stream); + } if (ftp->fd != -1) { #if HAVE_OPENSSL_EXT if (ftp->ssl_active) { diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 21e13ea460..99f3808c38 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -963,6 +963,7 @@ PHP_FUNCTION(ftp_nb_get) if ((ret = ftp_nb_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) == PHP_FTP_FAILED) { php_stream_close(outstream); + ftp->stream = NULL; VCWD_UNLINK(local); php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); RETURN_LONG(PHP_FTP_FAILED); @@ -970,6 +971,7 @@ PHP_FUNCTION(ftp_nb_get) if (ret == PHP_FTP_FINISHED){ php_stream_close(outstream); + ftp->stream = NULL; } RETURN_LONG(ret); @@ -1003,6 +1005,7 @@ PHP_FUNCTION(ftp_nb_continue) if (ret != PHP_FTP_MOREDATA && ftp->closestream) { php_stream_close(ftp->stream); + ftp->stream = NULL; } if (ret == PHP_FTP_FAILED) { @@ -1214,6 +1217,7 @@ PHP_FUNCTION(ftp_nb_put) if (ret != PHP_FTP_MOREDATA) { php_stream_close(instream); + ftp->stream = NULL; } if (ret == PHP_FTP_FAILED) { diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index 89b67210c5..e0d7e62f23 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -551,7 +551,8 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) struct pdo_column_data *col = &stmt->columns[colno]; RETCODE rc; SWORD colnamelen; - SDWORD colsize, displaysize; + SDWORD colsize; + SQLLEN displaysize; rc = SQLDescribeCol(S->stmt, colno+1, S->cols[colno].colname, sizeof(S->cols[colno].colname)-1, &colnamelen, diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 1bf0b3a4da..6a4eca5f03 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -896,6 +896,12 @@ retry: keepwalking = 1; } } else { + if (st & SNMP_CMD_WALK && response->errstat == SNMP_ERR_TOOBIG && objid_query->max_repetitions > 1) { /* Answer will not fit into single packet */ + objid_query->max_repetitions /= 2; + snmp_free_pdu(response); + keepwalking = 1; + continue; + } if (!(st & SNMP_CMD_WALK) || response->errstat != SNMP_ERR_NOSUCHNAME || Z_TYPE_P(return_value) == IS_BOOL) { for ( count=1, vars = response->variables; vars && count != response->errindex; |