Bugs item #1916627, was opened at 2008-03-17 13:10 Message generated for change (Comment added) made by bagder You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1916627&group_id=125852
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Response to [EMAIL PROTECTED] Initial Comment: Version 0.18 does not response to [EMAIL PROTECTED] message. Here is some code you could add to make it work. (based on what PuTTY does...) case SSH_MSG_CHANNEL_REQUEST: { if (libssh2_ntohu32(data + 5) == sizeof("exit-status") - 1 && !memcmp("exit-status", data + 9, sizeof("exit-status") - 1)) { /* we've got "exit-status" packet. Set the session value */ session->packAdd_channel = libssh2_channel_locate(session, libssh2_ntohu32(data + 1)); if (session->packAdd_channel) { session->packAdd_channel->exit_status = libssh2_ntohu32(data + 9 + sizeof("exit-status")); _libssh2_debug(session, LIBSSH2_DBG_CONN, "Exit status %lu received for channel %lu/%lu", session->packAdd_channel->exit_status, session->packAdd_channel->local.id, session->packAdd_channel->remote.id); } LIBSSH2_FREE(session, data); session->packAdd_state = libssh2_NB_state_idle; return 0; } else if(libssh2_ntohu32(data+5) == sizeof("[EMAIL PROTECTED]")-1 && !memcmp("[EMAIL PROTECTED]", data+9, sizeof("[EMAIL PROTECTED]")-1)) { libssh2_channel_send_keepalive(session->packAdd_channel); LIBSSH2_FREE(session, data); session->packAdd_state = libssh2_NB_state_idle; return 0; } } break; LIBSSH2_API int libssh2_channel_send_keepalive(LIBSSH2_CHANNEL * channel) { LIBSSH2_SESSION *session = channel->session; unsigned char packet[5]; /* packet_type(1) + channelno(4) */ int rc; _libssh2_debug(session, LIBSSH2_DBG_CONN, "Sending Keepalive on channel %lu/%lu", channel->local.id, channel->remote.id); packet[0] = SSH_MSG_CHANNEL_FAILURE; libssh2_htonu32(packet + 1, channel->remote.id); rc = libssh2_packet_write(session, packet, 5); if (rc == PACKET_EAGAIN) { return PACKET_EAGAIN; } else if (rc) { libssh2_error(session, LIBSSH2_ERROR_SOCKET_SEND, "Unable to send Keepalive on channel", 0); return -1; } //channel->local.eof = 1; return 0; } ---------------------------------------------------------------------- >Comment By: Daniel Stenberg (bagder) Date: 2008-09-29 15:32 Message: Please make a patch with 'diff -u' and submit it here and we can use it for inclusion! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1916627&group_id=125852 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel