summaryrefslogtreecommitdiffstats
path: root/client-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-23 10:48:23 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-23 10:48:23 +0000
commit688a487570e39312c39d7a46e0a7ed6e61392ee8 (patch)
treeed01d3073c1decf05b67adc25a19b0901d16d1e9 /client-fn.c
parent21c17da7e6f4631dc418a7b1768d217ce1ccae2f (diff)
Lift last MAXNAMELEN limit on -s argument.
Diffstat (limited to 'client-fn.c')
-rw-r--r--client-fn.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/client-fn.c b/client-fn.c
index 37fde7a1..598d520b 100644
--- a/client-fn.c
+++ b/client-fn.c
@@ -1,4 +1,4 @@
-/* $Id: client-fn.c,v 1.2 2007-10-03 12:34:16 nicm Exp $ */
+/* $Id: client-fn.c,v 1.3 2007-10-23 10:48:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -24,15 +24,13 @@
#include "tmux.h"
void
-client_fill_sessid(struct sessid *sid, char name[MAXNAMELEN])
+client_fill_session(struct msg_command_data *data)
{
char *env, *ptr, buf[256];
const char *errstr;
long long ll;
- strlcpy(sid->name, name, sizeof sid->name);
-
- sid->pid = -1;
+ data->pid = -1;
if ((env = getenv("TMUX")) == NULL)
return;
if ((ptr = strchr(env, ',')) == NULL)
@@ -45,12 +43,12 @@ client_fill_sessid(struct sessid *sid, char name[MAXNAMELEN])
ll = strtonum(ptr + 1, 0, UINT_MAX, &errstr);
if (errstr != NULL)
return;
- sid->idx = ll;
+ data->idx = ll;
ll = strtonum(buf, 0, LLONG_MAX, &errstr);
if (errstr != NULL)
return;
- sid->pid = ll;
+ data->pid = ll;
}
void