tools: default to the LIBEI_SOCKET if present

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-07-30 15:29:42 +10:00
parent 1bdca21772
commit 1817071b5a

View file

@ -46,7 +46,8 @@ int main(int argc, char **argv)
/* This should be handled by libei */
signal(SIGPIPE, SIG_IGN);
int rc = ei_socket_init(ei, SOCKETNAME);
int rc = ei_socket_init(ei, getenv("LIBEI_SOCKET") ? NULL : SOCKETNAME);
if (rc != 0) {
fprintf(stderr, "init failed: %s\n", strerror(errno));
return 1;