src/server/ssh_server/ssh_callbacks.cc
/**
 * Handle new incoming SSH session requests
 */
Handle new incoming SSH session requests
Handle new incoming SSH session requests
void bind_incoming_connection(ssh_bind sshbind, void *userdata)
{
	using namespace Genode;
	ssh_session session = ssh_new();
	if (!session || ssh_bind_accept(sshbind, session)) {
		error("could not accept session: '", ssh_get_error(session), "'");
		ssh_free(session);
		return;
	}
	Ssh::Server &server = *reinterpret_cast<Ssh::Server*>(userdata);
	try {
		server.incoming_connection(session);
	}
	catch (...) {
		ssh_disconnect(session);
		ssh_free(session);
	}
}
void bind_incoming_connection ( ssh_bind sshbind , void * userdata ) { using namespace Genode ; ssh_session session = ssh_new ( ) ; if ( ! session || ssh_bind_accept ( sshbind , session ) ) { error ( " " , ssh_get_error ( session ) , " " ) ; ssh_free ( session ) ; return ; } Ssh :: Server & server = * reinterpret_cast < Ssh :: Server * > ( userdata ) ; try { server . incoming_connection ( session ) ; } catch ( ... ) { ssh_disconnect ( session ) ; ssh_free ( session ) ; } }
Handle new incoming SSH session requests
Handle new incoming SSH session requests