version 1.2, 2009/07/13 23:11:35 |
version 1.3, 2009/07/26 12:58:44 |
|
|
|
|
int cmd_switch_client_parse(struct cmd *, int, char **, char **); |
int cmd_switch_client_parse(struct cmd *, int, char **, char **); |
int cmd_switch_client_exec(struct cmd *, struct cmd_ctx *); |
int cmd_switch_client_exec(struct cmd *, struct cmd_ctx *); |
void cmd_switch_client_send(struct cmd *, struct buffer *); |
|
void cmd_switch_client_recv(struct cmd *, struct buffer *); |
|
void cmd_switch_client_free(struct cmd *); |
void cmd_switch_client_free(struct cmd *); |
size_t cmd_switch_client_print(struct cmd *, char *, size_t); |
size_t cmd_switch_client_print(struct cmd *, char *, size_t); |
|
|
|
|
NULL, |
NULL, |
cmd_switch_client_parse, |
cmd_switch_client_parse, |
cmd_switch_client_exec, |
cmd_switch_client_exec, |
cmd_switch_client_send, |
|
cmd_switch_client_recv, |
|
cmd_switch_client_free, |
cmd_switch_client_free, |
cmd_switch_client_print |
cmd_switch_client_print |
}; |
}; |
|
|
server_redraw_client(c); |
server_redraw_client(c); |
|
|
return (0); |
return (0); |
} |
|
|
|
void |
|
cmd_switch_client_send(struct cmd *self, struct buffer *b) |
|
{ |
|
struct cmd_switch_client_data *data = self->data; |
|
|
|
buffer_write(b, data, sizeof *data); |
|
cmd_send_string(b, data->name); |
|
cmd_send_string(b, data->target); |
|
} |
|
|
|
void |
|
cmd_switch_client_recv(struct cmd *self, struct buffer *b) |
|
{ |
|
struct cmd_switch_client_data *data; |
|
|
|
self->data = data = xmalloc(sizeof *data); |
|
buffer_read(b, data, sizeof *data); |
|
data->name = cmd_recv_string(b); |
|
data->target = cmd_recv_string(b); |
|
} |
} |
|
|
void |
void |