Package: php-ssh2 / 1.2+0.13-4

0002-Fix-function-definition-arguments.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From: Andy Postnikov <apostnikov@gmail.com>
Date: Mon, 13 Jul 2020 23:32:53 +0300
Subject: Fix function definition arguments

- ssh2_poll() updated outdated ZEND_ARG_PASS_INFO usage and argument names
- added argument definition for ssh2_forward_listen() and ssh2_forward_accept()
---
 ssh2-1.2/ssh2.c | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/ssh2-1.2/ssh2.c b/ssh2-1.2/ssh2.c
index ee60f7b..4605f1a 100644
--- a/ssh2-1.2/ssh2.c
+++ b/ssh2-1.2/ssh2.c
@@ -45,10 +45,6 @@ int le_ssh2_listener;
 int le_ssh2_sftp;
 int le_ssh2_pkey_subsys;
 
-ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0)
-	ZEND_ARG_PASS_INFO(1)
-ZEND_END_ARG_INFO()
-
 /* *************
    * Callbacks *
    ************* */
@@ -1416,6 +1412,19 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ssh2_auth_hostbased_file, 0, 0, 5)
  	ZEND_ARG_INFO(0, local_username)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_ssh2_forward_listen, 0, 0, 2)
+ 	ZEND_ARG_INFO(0, session)
+ 	ZEND_ARG_INFO(0, port)
+ 	ZEND_ARG_INFO(0, host)
+ 	ZEND_ARG_INFO(0, max_connections)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_ssh2_forward_accept, 0, 0, 1)
+ 	ZEND_ARG_INFO(0, listener)
+ 	ZEND_ARG_INFO(1, host)
+ 	ZEND_ARG_INFO(0, port)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_ssh2_shell, 0, 0, 1)
  	ZEND_ARG_INFO(0, session)
  	ZEND_ARG_INFO(0, termtype)
@@ -1459,6 +1468,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_ssh2_fetch_stream, 2)
  	ZEND_ARG_INFO(0, streamid)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_ssh2_poll, 0, 0, 1)
+ 	ZEND_ARG_INFO(1, polldes)
+ 	ZEND_ARG_INFO(0, timeout)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_ssh2_sftp, 1)
  	ZEND_ARG_INFO(0, session)
 ZEND_END_ARG_INFO()
@@ -1559,8 +1573,8 @@ zend_function_entry ssh2_functions[] = {
 	PHP_FE(ssh2_auth_pubkey_file,				arginfo_ssh2_auth_pubkey_file)
 	PHP_FE(ssh2_auth_hostbased_file,			arginfo_ssh2_auth_hostbased_file)
 
-	PHP_FE(ssh2_forward_listen,					NULL)
-	PHP_FE(ssh2_forward_accept,					NULL)
+	PHP_FE(ssh2_forward_listen,					arginfo_ssh2_forward_listen)
+	PHP_FE(ssh2_forward_accept,					arginfo_ssh2_forward_accept)
 
 	/* Stream Stuff */
 	PHP_FE(ssh2_shell,							arginfo_ssh2_shell)
@@ -1569,7 +1583,7 @@ zend_function_entry ssh2_functions[] = {
 	PHP_FE(ssh2_scp_recv,						arginfo_ssh2_scp_recv)
 	PHP_FE(ssh2_scp_send,						arginfo_ssh2_scp_send)
 	PHP_FE(ssh2_fetch_stream,					arginfo_ssh2_fetch_stream)
-	PHP_FE(ssh2_poll,							php_ssh2_first_arg_force_ref)
+	PHP_FE(ssh2_poll,							arginfo_ssh2_poll)
 
 	/* SFTP Stuff */
 	PHP_FE(ssh2_sftp,							arginfo_ssh2_sftp)