version 1.263, 2015/01/19 19:52:16 |
version 1.264, 2015/01/19 20:07:45 |
|
|
} |
} |
} |
} |
|
|
static void |
static int |
client_global_request_reply(int type, u_int32_t seq, void *ctxt) |
client_global_request_reply(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
struct global_confirm *gc; |
struct global_confirm *gc; |
|
|
if ((gc = TAILQ_FIRST(&global_confirms)) == NULL) |
if ((gc = TAILQ_FIRST(&global_confirms)) == NULL) |
return; |
return 0; |
if (gc->cb != NULL) |
if (gc->cb != NULL) |
gc->cb(type, seq, gc->ctx); |
gc->cb(type, seq, gc->ctx); |
if (--gc->ref_count <= 0) { |
if (--gc->ref_count <= 0) { |
|
|
} |
} |
|
|
packet_set_alive_timeouts(0); |
packet_set_alive_timeouts(0); |
|
return 0; |
} |
} |
|
|
static void |
static void |
|
|
|
|
/*********/ |
/*********/ |
|
|
static void |
static int |
client_input_stdout_data(int type, u_int32_t seq, void *ctxt) |
client_input_stdout_data(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
u_int data_len; |
u_int data_len; |
|
|
buffer_append(&stdout_buffer, data, data_len); |
buffer_append(&stdout_buffer, data, data_len); |
explicit_bzero(data, data_len); |
explicit_bzero(data, data_len); |
free(data); |
free(data); |
|
return 0; |
} |
} |
static void |
static int |
client_input_stderr_data(int type, u_int32_t seq, void *ctxt) |
client_input_stderr_data(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
u_int data_len; |
u_int data_len; |
|
|
buffer_append(&stderr_buffer, data, data_len); |
buffer_append(&stderr_buffer, data, data_len); |
explicit_bzero(data, data_len); |
explicit_bzero(data, data_len); |
free(data); |
free(data); |
|
return 0; |
} |
} |
static void |
static int |
client_input_exit_status(int type, u_int32_t seq, void *ctxt) |
client_input_exit_status(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
exit_status = packet_get_int(); |
exit_status = packet_get_int(); |
|
|
packet_write_wait(); |
packet_write_wait(); |
/* Flag that we want to exit. */ |
/* Flag that we want to exit. */ |
quit_pending = 1; |
quit_pending = 1; |
|
return 0; |
} |
} |
static void |
static int |
client_input_agent_open(int type, u_int32_t seq, void *ctxt) |
client_input_agent_open(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
Channel *c = NULL; |
Channel *c = NULL; |
|
|
packet_put_int(c->self); |
packet_put_int(c->self); |
} |
} |
packet_send(); |
packet_send(); |
|
return 0; |
} |
} |
|
|
static Channel * |
static Channel * |
|
|
} |
} |
|
|
/* XXXX move to generic input handler */ |
/* XXXX move to generic input handler */ |
static void |
static int |
client_input_channel_open(int type, u_int32_t seq, void *ctxt) |
client_input_channel_open(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
Channel *c = NULL; |
Channel *c = NULL; |
|
|
packet_send(); |
packet_send(); |
} |
} |
free(ctype); |
free(ctype); |
|
return 0; |
} |
} |
static void |
static int |
client_input_channel_req(int type, u_int32_t seq, void *ctxt) |
client_input_channel_req(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
Channel *c = NULL; |
Channel *c = NULL; |
|
|
packet_send(); |
packet_send(); |
} |
} |
free(rtype); |
free(rtype); |
|
return 0; |
} |
} |
static void |
static int |
client_input_global_request(int type, u_int32_t seq, void *ctxt) |
client_input_global_request(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
char *rtype; |
char *rtype; |
|
|
packet_write_wait(); |
packet_write_wait(); |
} |
} |
free(rtype); |
free(rtype); |
|
return 0; |
} |
} |
|
|
void |
void |