Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
extensions
>
php5-ssh2
> php5-ssh2-fixes.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php5-ssh2-fixes.patch of Package php5-ssh2 (Revision 8)
Currently displaying revision
8
,
show latest
Index: ssh2_fopen_wrappers.c =================================================================== RCS file: /repository/pecl/ssh2/ssh2_fopen_wrappers.c,v retrieving revision 1.11 retrieving revision 1.13 diff -u -r1.11 -r1.13 --- ssh2_fopen_wrappers.c 12 Jul 2005 03:24:20 -0000 1.11 +++ ssh2_fopen_wrappers.c 7 Jun 2006 17:35:34 -0000 1.13 @@ -2,6 +2,8 @@ +----------------------------------------------------------------------+ | PHP Version 4 | +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | @@ -13,7 +15,7 @@ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ - $Id: ssh2_fopen_wrappers.c,v 1.11 2005/07/12 03:24:20 pollita Exp $ + $Id: ssh2_fopen_wrappers.c,v 1.13 2006/06/07 17:35:34 pollita Exp $ */ #ifdef HAVE_CONFIG_H @@ -48,7 +50,7 @@ { php_ssh2_channel_data *abstract = (php_ssh2_channel_data*)stream->abstract; - if (!abstract->refcount || (--*(abstract->refcount) == 0)) { + if (!abstract->refcount || (--(*(abstract->refcount)) == 0)) { /* Last one out, turn off the lights */ if (abstract->refcount) { efree(abstract->refcount); @@ -1232,7 +1234,7 @@ RETURN_FALSE; } - *(data->refcount)++; + (*(data->refcount))++; stream_data = emalloc(sizeof(php_ssh2_channel_data)); memcpy(stream_data, data, sizeof(php_ssh2_channel_data)); Index: ssh2.c =================================================================== RCS file: /repository/pecl/ssh2/ssh2.c,v retrieving revision 1.14 retrieving revision 1.18 diff -u -r1.14 -r1.18 --- ssh2.c 1 Nov 2005 23:40:23 -0000 1.14 +++ ssh2.c 7 Jun 2006 17:35:34 -0000 1.18 @@ -2,6 +2,8 @@ +----------------------------------------------------------------------+ | PHP Version 4 | +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | @@ -13,7 +15,7 @@ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ - $Id: ssh2.c,v 1.14 2005/11/01 23:40:23 pollita Exp $ + $Id: ssh2.c,v 1.18 2006/06/07 17:35:34 pollita Exp $ */ #ifdef HAVE_CONFIG_H @@ -22,6 +24,7 @@ #include "php.h" #include "ext/standard/info.h" +#include "ext/standard/file.h" #include "php_ssh2.h" #include "main/php_network.h" @@ -329,13 +332,17 @@ LIBSSH2_SESSION *session; int socket; php_ssh2_session_data *data; + struct timeval tv; + + tv.tv_sec = FG(default_socket_timeout); + tv.tv_usec = 0; #if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0) - socket = php_network_connect_socket_to_host(host, port, SOCK_STREAM, 0, NULL, NULL, NULL, NULL, 0 TSRMLS_CC); + socket = php_network_connect_socket_to_host(host, port, SOCK_STREAM, 0, &tv, NULL, NULL, NULL, 0 TSRMLS_CC); #elif PHP_MAJOR_VERSION == 5 - socket = php_network_connect_socket_to_host(host, port, SOCK_STREAM, 0, NULL, NULL, NULL TSRMLS_CC); + socket = php_network_connect_socket_to_host(host, port, SOCK_STREAM, 0, &tv, NULL, NULL TSRMLS_CC); #else - socket = php_hostconnect(host, port, SOCK_STREAM, NULL TSRMLS_CC); + socket = php_hostconnect(host, port, SOCK_STREAM, &tv TSRMLS_CC); #endif if (socket <= 0) { @@ -469,7 +476,7 @@ { LIBSSH2_SESSION *session; zval *zsession, *endpoint; - char *kex, *hostkey, *crypt_cs, *crypt_sc, *mac_cs, *mac_sc, *comp_cs, *comp_sc, *lang_cs, *lang_sc; + const char *kex, *hostkey, *crypt_cs, *crypt_sc, *mac_cs, *mac_sc, *comp_cs, *comp_sc, *lang_cs, *lang_sc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zsession) == FAILURE) { RETURN_FALSE; @@ -522,7 +529,7 @@ { LIBSSH2_SESSION *session; zval *zsession; - char *fingerprint; + const char *fingerprint; long flags = 0; int i, fingerprint_len; @@ -1245,19 +1252,19 @@ PHP_MINFO_FUNCTION(ssh2) { php_info_print_table_start(); - php_info_print_table_header(2, "libssh2 version", LIBSSH2_VERSION); - php_info_print_table_header(2, "banner", LIBSSH2_SSH_BANNER); + php_info_print_table_row(2, "libssh2 version", LIBSSH2_VERSION); + php_info_print_table_row(2, "banner", LIBSSH2_SSH_BANNER); #ifdef PHP_SSH2_REMOTE_FORWARDING - php_info_print_table_header(2, "remote forwarding", "enabled"); + php_info_print_table_row(2, "remote forwarding", "enabled"); #endif #ifdef PHP_SSH2_HOSTBASED_AUTH - php_info_print_table_header(2, "hostbased auth", "enabled"); + php_info_print_table_row(2, "hostbased auth", "enabled"); #endif #ifdef PHP_SSH2_POLL - php_info_print_table_header(2, "polling support", "enabled"); + php_info_print_table_row(2, "polling support", "enabled"); #endif #ifdef PHP_SSH2_PUBLICKEY_SUBSYSTEM - php_info_print_table_header(2, "publickey subsystem", "enabled"); + php_info_print_table_row(2, "publickey subsystem", "enabled"); #endif php_info_print_table_end(); }