aboutsummaryrefslogtreecommitdiff
path: root/libssh/messages.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-09-23 21:55:54 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-09-23 21:55:54 +0200
commit9a8d4cd0fdd18127065cacbc11296933669ea9ca (patch)
treecccf507167e28aa5038cea357d1f220668a4e937 /libssh/messages.c
parentffed8b03bb6e170abbd9564547ba439302840618 (diff)
downloadlibssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.tar.gz
libssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.tar.xz
libssh-9a8d4cd0fdd18127065cacbc11296933669ea9ca.zip
get rid of SSH_SESSION
Diffstat (limited to 'libssh/messages.c')
-rw-r--r--libssh/messages.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libssh/messages.c b/libssh/messages.c
index a225253..2989d0c 100644
--- a/libssh/messages.c
+++ b/libssh/messages.c
@@ -44,7 +44,7 @@
#include "libssh/ssh2.h"
-static SSH_MESSAGE *message_new(SSH_SESSION *session){
+static SSH_MESSAGE *message_new(ssh_session session){
SSH_MESSAGE *msg = malloc(sizeof(SSH_MESSAGE));
if (msg == NULL) {
return NULL;
@@ -55,7 +55,7 @@ static SSH_MESSAGE *message_new(SSH_SESSION *session){
return msg;
}
-static SSH_MESSAGE *handle_service_request(SSH_SESSION *session) {
+static SSH_MESSAGE *handle_service_request(ssh_session session) {
ssh_string service = NULL;
char *service_c = NULL;
SSH_MESSAGE *msg=NULL;
@@ -86,7 +86,7 @@ static SSH_MESSAGE *handle_service_request(SSH_SESSION *session) {
return msg;
}
-static int handle_unimplemented(SSH_SESSION *session) {
+static int handle_unimplemented(ssh_session session) {
if (buffer_add_u32(session->out_buffer, htonl(session->recv_seq - 1)) < 0) {
return -1;
}
@@ -98,7 +98,7 @@ static int handle_unimplemented(SSH_SESSION *session) {
return 0;
}
-static SSH_MESSAGE *handle_userauth_request(SSH_SESSION *session){
+static SSH_MESSAGE *handle_userauth_request(ssh_session session){
ssh_string user = NULL;
ssh_string service = NULL;
ssh_string method = NULL;
@@ -264,7 +264,7 @@ error:
return NULL;
}
-static SSH_MESSAGE *handle_channel_request_open(SSH_SESSION *session) {
+static SSH_MESSAGE *handle_channel_request_open(ssh_session session) {
SSH_MESSAGE *msg = NULL;
ssh_string type = NULL, originator = NULL, destination = NULL;
char *type_c = NULL;
@@ -414,7 +414,7 @@ error:
}
ssh_channel ssh_message_channel_request_open_reply_accept(SSH_MESSAGE *msg) {
- SSH_SESSION *session = msg->session;
+ ssh_session session = msg->session;
ssh_channel chan = NULL;
enter_function();
@@ -470,7 +470,7 @@ error:
return NULL;
}
-static SSH_MESSAGE *handle_channel_request(SSH_SESSION *session) {
+static SSH_MESSAGE *handle_channel_request(ssh_session session) {
SSH_MESSAGE *msg = NULL;
ssh_string type = NULL;
char *type_c = NULL;
@@ -693,7 +693,7 @@ int ssh_message_channel_request_reply_success(SSH_MESSAGE *msg) {
return SSH_OK;
}
-SSH_MESSAGE *ssh_message_retrieve(SSH_SESSION *session, uint32_t packettype){
+SSH_MESSAGE *ssh_message_retrieve(ssh_session session, uint32_t packettype){
SSH_MESSAGE *msg=NULL;
enter_function();
switch(packettype) {
@@ -722,7 +722,7 @@ SSH_MESSAGE *ssh_message_retrieve(SSH_SESSION *session, uint32_t packettype){
/* \brief blocking message retrieval
* \bug does anything that is not a message, like a channel read/write
*/
-SSH_MESSAGE *ssh_message_get(SSH_SESSION *session) {
+SSH_MESSAGE *ssh_message_get(ssh_session session) {
SSH_MESSAGE *msg = NULL;
enter_function();
do {
@@ -799,7 +799,7 @@ void ssh_message_free(SSH_MESSAGE *msg){
* \param type packet type
* \returns nothing
*/
-void message_handle(SSH_SESSION *session, uint32_t type){
+void message_handle(ssh_session session, uint32_t type){
SSH_MESSAGE *msg=ssh_message_retrieve(session,type);
if(msg){
if(!session->ssh_message_list){