proc_send_s now seems unnecessary.

pull/1014/head
nicm 2017-07-12 09:07:52 +00:00
parent 58b796608f
commit d0d42dc4cb
4 changed files with 3 additions and 10 deletions

6
proc.c
View File

@ -161,12 +161,6 @@ proc_send(struct tmuxpeer *peer, enum msgtype type, int fd, const void *buf,
return (0);
}
int
proc_send_s(struct tmuxpeer *peer, enum msgtype type, const char *s)
{
return (proc_send(peer, type, -1, s, strlen(s) + 1));
}
struct tmuxproc *
proc_start(const char *name, struct event_base *base, int forkflag,
void (*signalcb)(int))

View File

@ -371,7 +371,7 @@ server_client_detach(struct client *c, enum msgtype msgtype)
c->flags |= CLIENT_DETACHING;
notify_client("client-detached", c);
proc_send_s(c->peer, msgtype, s->name);
proc_send(c->peer, msgtype, -1, s->name, strlen(s->name) + 1);
}
/* Execute command to replace a client. */
@ -1721,7 +1721,7 @@ server_client_dispatch_shell(struct client *c)
shell = options_get_string(global_s_options, "default-shell");
if (*shell == '\0' || areshell(shell))
shell = _PATH_BSHELL;
proc_send_s(c->peer, MSG_SHELL, shell);
proc_send(c->peer, MSG_SHELL, -1, shell, strlen(shell) + 1);
proc_kill_peer(c->peer);
}

View File

@ -173,7 +173,7 @@ server_lock_client(struct client *c)
tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_E3));
c->flags |= CLIENT_SUSPENDED;
proc_send_s(c->peer, MSG_LOCK, cmd);
proc_send(c->peer, MSG_LOCK, -1, cmd, strlen(cmd) + 1);
}
void

1
tmux.h
View File

@ -1493,7 +1493,6 @@ const char *find_home(void);
/* proc.c */
struct imsg;
int proc_send(struct tmuxpeer *, enum msgtype, int, const void *, size_t);
int proc_send_s(struct tmuxpeer *, enum msgtype, const char *);
struct tmuxproc *proc_start(const char *, struct event_base *, int,
void (*)(int));
void proc_loop(struct tmuxproc *, int (*)(void));