/* {{{ get_ftp_result
*/
-static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC)
+static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size)
{
+ buffer[0] = '\0'; /* in case read fails to read anything */
while (php_stream_gets(stream, buffer, buffer_size-1) &&
!(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
isdigit((int) buffer[2]) && buffer[3] == ' '));
php_stream_context_set(datastream, context);
if (use_ssl_on_data && (php_stream_xport_crypto_setup(datastream,
- STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL TSRMLS_CC) < 0 ||
- php_stream_xport_crypto_enable(datastream, 1 TSRMLS_CC) < 0)) {
+ STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL) < 0 ||
+ php_stream_xport_crypto_enable(datastream, 1) < 0)) {
- php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Unable to activate SSL mode");
+ php_stream_wrapper_log_error(wrapper, options, "Unable to activate SSL mode");
php_stream_close(datastream);
datastream = NULL;
- goto opendir_errexit;
+ goto opendir_errexit;
}