Tidy the code that works out the socket path, and just use the full path

in the global socket_path rather than copying it.
This commit is contained in:
nicm
2015-11-24 22:27:22 +00:00
parent 8976dac9e0
commit c913fb99b6
3 changed files with 42 additions and 50 deletions

View File

@ -55,7 +55,7 @@ int client_attached;
__dead void client_exec(const char *);
int client_get_lock(char *);
int client_connect(struct event_base *, char *, int);
int client_connect(struct event_base *, const char *, int);
void client_send_identify(const char *, const char *);
void client_stdin_callback(int, short, void *);
void client_write(int, const char *, size_t);
@ -96,7 +96,7 @@ client_get_lock(char *lockfile)
/* Connect client to server. */
int
client_connect(struct event_base *base, char *path, int start_server)
client_connect(struct event_base *base, const char *path, int start_server)
{
struct sockaddr_un sa;
size_t size;