Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh2_fopen_wrappers: initialize php_stream_wrapper_ops explicitly #68

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions ssh2_fopen_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,12 @@ static php_stream_wrapper_ops php_ssh2_shell_stream_wops = {
NULL, /* stat */
NULL, /* stat_url */
NULL, /* opendir */
"ssh2.shell"
"ssh2.shell", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL, /* rmdir */
NULL /* stream_metadata */
};

php_stream_wrapper php_ssh2_stream_wrapper_shell = {
Expand Down Expand Up @@ -964,7 +969,12 @@ static php_stream_wrapper_ops php_ssh2_exec_stream_wops = {
NULL, /* stat */
NULL, /* stat_url */
NULL, /* opendir */
"ssh2.exec"
"ssh2.exec", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL, /* rmdir */
NULL /* stream_metadata */
};

php_stream_wrapper php_ssh2_stream_wrapper_exec = {
Expand Down Expand Up @@ -1105,7 +1115,12 @@ static php_stream_wrapper_ops php_ssh2_scp_stream_wops = {
NULL, /* stat */
NULL, /* stat_url */
NULL, /* opendir */
"ssh2.scp"
"ssh2.scp", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL, /* rmdir */
NULL /* stream_metadata */
};

php_stream_wrapper php_ssh2_stream_wrapper_scp = {
Expand Down Expand Up @@ -1375,7 +1390,12 @@ static php_stream_wrapper_ops php_ssh2_tunnel_stream_wops = {
NULL, /* stat */
NULL, /* stat_url */
NULL, /* opendir */
"ssh2.tunnel"
"ssh2.tunnel", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL, /* rmdir */
NULL /* stream_metadata */
};

php_stream_wrapper php_ssh2_stream_wrapper_tunnel = {
Expand Down
17 changes: 9 additions & 8 deletions ssh2_sftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,16 @@ static int php_ssh2_sftp_rmdir(php_stream_wrapper *wrapper, const char *url, int

static php_stream_wrapper_ops php_ssh2_sftp_wrapper_ops = {
php_ssh2_sftp_stream_opener,
NULL, /* close */
NULL, /* stream_close */
NULL, /* stat */
php_ssh2_sftp_urlstat,
php_ssh2_sftp_dirstream_opener,
PHP_SSH2_SFTP_WRAPPER_NAME,
php_ssh2_sftp_unlink,
php_ssh2_sftp_rename,
php_ssh2_sftp_mkdir,
php_ssh2_sftp_rmdir,
php_ssh2_sftp_urlstat, /* stat_url */
php_ssh2_sftp_dirstream_opener, /* opendir */
PHP_SSH2_SFTP_WRAPPER_NAME, /* label */
php_ssh2_sftp_unlink, /* unlink */
php_ssh2_sftp_rename, /* rename */
php_ssh2_sftp_mkdir, /* mkdir */
php_ssh2_sftp_rmdir, /* rmdir */
NULL /* stream_metadata */
};

php_stream_wrapper php_ssh2_sftp_wrapper = {
Expand Down