aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-09-27 22:07:38 +0000
committerStefan Monnier2002-09-27 22:07:38 +0000
commit3ecdcd59050a2eba016ec32c89a5dd5ed536c52f (patch)
treef85d09c439deb79c169e9cf782aeaf2782dd3f8a
parent15d40fa45425863d9fb47a73d32e6ecf0b8b6263 (diff)
downloademacs-3ecdcd59050a2eba016ec32c89a5dd5ed536c52f.tar.gz
emacs-3ecdcd59050a2eba016ec32c89a5dd5ed536c52f.zip
(main): Always use /tmp and non-qualified hostname.
-rw-r--r--lib-src/ChangeLog1
-rw-r--r--lib-src/emacsclient.c17
2 files changed, 7 insertions, 11 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index fd9154506af..d441bc45187 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -6,6 +6,7 @@
6 (decode_options): Add -e and -d processing. 6 (decode_options): Add -e and -d processing.
7 (print_help_and_exit): Update the usage string. 7 (print_help_and_exit): Update the usage string.
8 (main): Add support for --eval and --display. 8 (main): Add support for --eval and --display.
9 (main): Always use /tmp and non-qualified hostname.
9 10
102002-09-25 Stefan Monnier <monnier@cs.yale.edu> 112002-09-25 Stefan Monnier <monnier@cs.yale.edu>
11 12
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index ac530174094..d06334eb8f3 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -313,6 +313,7 @@ main (argc, argv)
313 server.sun_family = AF_UNIX; 313 server.sun_family = AF_UNIX;
314 314
315 { 315 {
316 char *dot;
316 system_name_length = 32; 317 system_name_length = 32;
317 318
318 while (1) 319 while (1)
@@ -328,9 +329,13 @@ main (argc, argv)
328 free (system_name); 329 free (system_name);
329 system_name_length *= 2; 330 system_name_length *= 2;
330 } 331 }
332
333 /* We always use the non-dotted host name, for simplicity. */
334 dot = index (system_name, '.');
335 if (dot)
336 *dot = '\0';
331 } 337 }
332 338
333#ifndef SERVER_HOME_DIR
334 { 339 {
335 int sock_status = 0; 340 int sock_status = 0;
336 341
@@ -387,16 +392,6 @@ main (argc, argv)
387 break; 392 break;
388 } 393 }
389 } 394 }
390#else
391 if ((homedir = getenv ("HOME")) == NULL)
392 {
393 fprintf (stderr, "%s: No home directory\n", argv[0]);
394 fail (argc, argv);
395 }
396 strcpy (server.sun_path, homedir);
397 strcat (server.sun_path, "/.emacs-server-");
398 strcat (server.sun_path, system_name);
399#endif
400 395
401 if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) 396 if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2)
402 < 0) 397 < 0)