server: Rename address environment variable

To follow the pattern of using NVIM for technical descriptions, it was renamed
to NVIM_LISTEN_ADDRESS
This commit is contained in:
Thiago de Arruda
2014-09-13 16:20:50 -03:00
parent 5778c25c01
commit 2d1b5589e8
2 changed files with 6 additions and 5 deletions

View File

@@ -17,6 +17,7 @@
#define MAX_CONNECTIONS 32
#define ADDRESS_MAX_SIZE 256
#define NEOVIM_DEFAULT_TCP_PORT 7450
#define LISTEN_ADDRESS_ENV_VAR "NVIM_LISTEN_ADDRESS"
typedef enum {
kServerTypeTcp,
@@ -51,13 +52,13 @@ void server_init(void)
{
servers = pmap_new(cstr_t)();
if (!os_getenv("NEOVIM_LISTEN_ADDRESS")) {
if (!os_getenv(LISTEN_ADDRESS_ENV_VAR)) {
char *listen_address = (char *)vim_tempname();
os_setenv("NEOVIM_LISTEN_ADDRESS", listen_address, 1);
os_setenv(LISTEN_ADDRESS_ENV_VAR, listen_address, 1);
free(listen_address);
}
server_start((char *)os_getenv("NEOVIM_LISTEN_ADDRESS"));
server_start((char *)os_getenv(LISTEN_ADDRESS_ENV_VAR));
}
/// Teardown the server module