aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--client.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/TODO b/TODO
index b3e83826..6234eb0b 100644
--- a/TODO
+++ b/TODO
@@ -71,8 +71,6 @@
- different screen model? layers perhaps? hmm
-- For 0.3 --------------------------------------------------------------------
-- anything which uses cmd_{send,recv}_string will break if the string is
- split. string length should be part of the command size
- chmod +x socket when any client is attached (upd in lost/accept)
- clear EOL etc CANNOT rely on term using the current colour/attr and probably
should not emulate it doing so
diff --git a/client.c b/client.c
index 7acc2eeb..42056faa 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.26 2008-05-31 20:04:15 nicm Exp $ */
+/* $Id: client.c,v 1.27 2008-06-01 21:24:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -44,6 +44,7 @@ client_init(const char *path, struct client_ctx *cctx, int start_server)
size_t size;
int mode;
u_int retries;
+ struct buffer *b;
retries = 0;
retry:
@@ -99,8 +100,12 @@ retry:
data.sy = ws.ws_row;
if (ttyname_r(STDIN_FILENO, data.tty, sizeof data.tty) != 0)
fatal("ttyname_r failed");
- client_write_server(cctx, MSG_IDENTIFY, &data, sizeof data);
- cmd_send_string(cctx->srv_out, getenv("TERM"));
+
+ b = buffer_create(BUFSIZ);
+ cmd_send_string(b, getenv("TERM"));
+ client_write_server2(cctx, MSG_IDENTIFY,
+ &data, sizeof data, BUFFER_OUT(b), BUFFER_USED(b));
+ buffer_destroy(b);
}
return (0);