Skip to content

Commit

Permalink
update to 'base' naming'
Browse files Browse the repository at this point in the history
  • Loading branch information
dovholuknf committed Oct 9, 2024
1 parent 5516643 commit f9f6dbe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions programs/ziti-edge-tunnel/ziti-edge-tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ static uv_cond_t stop_cond;
IMPL_ENUM(event, EVENT_ACTIONS)

#if _WIN32
static char sockfile__[] = "\\\\.\\pipe\\ziti-edge-tunnel.sock";
static char eventsockfile__[] = "\\\\.\\pipe\\ziti-edge-tunnel-event.sock";
static char sockfilebase[] = "\\\\.\\pipe\\ziti-edge-tunnel.sock";
static char eventsockfilebase[] = "\\\\.\\pipe\\ziti-edge-tunnel-event.sock";
#elif __unix__ || unix || ( __APPLE__ && __MACH__ )
#include <grp.h>
#include <sys/un.h>
#define SOCKET_PATH "/tmp/.ziti"
static char sockfile[] = SOCKET_PATH "/ziti-edge-tunnel.sock";
static char eventsockfile[] = SOCKET_PATH "/ziti-edge-tunnel-event.sock";
static char sockfilebase[] = SOCKET_PATH "/ziti-edge-tunnel.sock";
static char eventsockfilebase[] = SOCKET_PATH "/ziti-edge-tunnel-event.sock";
#endif

static char* sockfile;
Expand Down Expand Up @@ -2020,14 +2020,14 @@ static void configure_ipc() {
ipc_discriminator = malloc(10);
snprintf(ipc_discriminator, 10, "%d", pid);
}
sockfile = calloc(strlen(sockfile__) + 1 + strlen(ipc_discriminator), sizeof(char));
eventsockfile = calloc(strlen(eventsockfile__) + 1 + strlen(ipc_discriminator), sizeof(char));
sockfile = calloc(strlen(sockfilebase) + 1 + strlen(ipc_discriminator), sizeof(char));
eventsockfile = calloc(strlen(eventsockfilebase) + 1 + strlen(ipc_discriminator), sizeof(char));

strcat(sockfile, sockfile__);
strcat(sockfile, sockfilebase);
// strcat(sockfile, ".");
// strcat(sockfile, ipc_discriminator);

strcat(eventsockfile, eventsockfile__);
strcat(eventsockfile, eventsockfilebase);
// strcat(eventsockfile, ".");
// strcat(eventsockfile, ipc_discriminator);
}
Expand Down

0 comments on commit f9f6dbe

Please sign in to comment.