(main): Move the dynamic allocation of
system_name outside of the SERVER_HOME_DIR conditional.
This commit is contained in:
parent
65a44e9fc0
commit
c5fee54517
2 changed files with 8 additions and 6 deletions
|
@ -219,9 +219,8 @@ main (argc, argv)
|
|||
exit (1);
|
||||
}
|
||||
server.sun_family = AF_UNIX;
|
||||
#ifndef SERVER_HOME_DIR
|
||||
|
||||
{
|
||||
struct stat statbfr;
|
||||
system_name_length = 32;
|
||||
|
||||
while (1)
|
||||
|
@ -237,6 +236,11 @@ main (argc, argv)
|
|||
free (system_name);
|
||||
system_name_length *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SERVER_HOME_DIR
|
||||
{
|
||||
struct stat statbfr;
|
||||
|
||||
sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
|
||||
|
||||
|
@ -265,7 +269,6 @@ main (argc, argv)
|
|||
}
|
||||
strcpy (server.sun_path, homedir);
|
||||
strcat (server.sun_path, "/.emacs-server-");
|
||||
gethostname (system_name, sizeof (system_name));
|
||||
strcat (server.sun_path, system_name);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue