Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
62987
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
tommy.lindgren [...] gmail.com
Cc:
AdminCc:



Subject: [PATCH] Exit signal support
Hi, Exit signal support has recently been added to libssh2 (in the git repo, not in any release yet). Attached patch exposes this functionality in Net::SSH2. It's my first XS code so the patch might need refinement... Thanks, Tommy
Subject: netssh2_exit_signal.diff
=== modified file 'net-ssh2/SSH2.xs' --- net-ssh2/SSH2.xs 2010-11-11 17:18:06 +0000 +++ net-ssh2/SSH2.xs 2010-11-15 12:18:00 +0000 @@ -1174,11 +1174,20 @@ clear_error(ch->ss); XSRETURN_IV(libssh2_channel_get_exit_status(ch->channel)); -void +SV* net_ch_exit_signal(SSH2_CHANNEL* ch) CODE: clear_error(ch->ss); - XSRETURN_PV(libssh2_channel_get_exit_signal(ch->channel)); + RETVAL = NULL; + char *exitsignal = NULL; + libssh2_channel_get_exit_signal(ch->channel, &exitsignal, + NULL, NULL, NULL, NULL, NULL); + if (exitsignal) { + RETVAL = newSVpv(exitsignal, 0); + libssh2_free(ch->ss->session, exitsignal); + } +OUTPUT: + RETVAL #if LIBSSH2_VERSION_MAJOR >= 1
From: tommy.lindgren@gmail.com
Argh sorry, patch was incomplete, attached new one.
Subject: netssh2_exit_signal2.diff
=== modified file 'net-ssh2/SSH2.xs' --- net-ssh2/SSH2.xs 2010-11-11 17:07:09 +0000 +++ net-ssh2/SSH2.xs 2010-11-15 12:18:00 +0000 @@ -1174,6 +1174,21 @@ clear_error(ch->ss); XSRETURN_IV(libssh2_channel_get_exit_status(ch->channel)); +SV* +net_ch_exit_signal(SSH2_CHANNEL* ch) +CODE: + clear_error(ch->ss); + RETVAL = NULL; + char *exitsignal = NULL; + libssh2_channel_get_exit_signal(ch->channel, &exitsignal, + NULL, NULL, NULL, NULL, NULL); + if (exitsignal) { + RETVAL = newSVpv(exitsignal, 0); + libssh2_free(ch->ss->session, exitsignal); + } +OUTPUT: + RETVAL + #if LIBSSH2_VERSION_MAJOR >= 1 void
From: psantann@gmail.com
On Mon Nov 15 07:47:16 2010, n3tomyl wrote:
Show quoted text
> Argh sorry, patch was incomplete, attached new one.
This is not working for me: patching file SSH2.xs patch: **** malformed patch at line 5: clear_error(ch->ss); Could you post the complete file? Thanks, Paulo
From: tommy.lindgren@gmail.com
On Tue May 03 21:37:02 2011, psantanna wrote:
Show quoted text
> On Mon Nov 15 07:47:16 2010, n3tomyl wrote:
> > Argh sorry, patch was incomplete, attached new one.
> > This is not working for me: > > patching file SSH2.xs > patch: **** malformed patch at line 5: clear_error(ch->ss); > > Could you post the complete file?
Sure, attached. Regards, Tommy
Subject: SSH2.xs

Message body is not shown because it is too large.

From: psantann@siac.com
On Wed May 04 03:48:42 2011, n3tomyl wrote:
Show quoted text
> On Tue May 03 21:37:02 2011, psantanna wrote:
> > On Mon Nov 15 07:47:16 2010, n3tomyl wrote:
> > > Argh sorry, patch was incomplete, attached new one.
> > > > This is not working for me: > > > > patching file SSH2.xs > > patch: **** malformed patch at line 5: clear_error(ch->ss); > > > > Could you post the complete file?
> > Sure, attached. > > Regards, > Tommy >
Tommy, Thanks for your quick answer! Regards, Paulo
Applied in 0.34 with version check.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.