tUnix server now fails "gracefully" if it cannot create the Unix domain socket for admin connections. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 7ec41f905935a023bcfddcc05bf9b6056df696a8
(DIR) parent 552fc3aa66ce14482f8dd357e0eacca124eaa2aa
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Wed, 13 Mar 2002 11:45:45 +0000
Unix server now fails "gracefully" if it cannot create the Unix domain
socket for admin connections.
Diffstat:
M ChangeLog | 2 ++
M TODO | 4 ++++
M src/serverside.c | 12 +++++++++---
3 files changed, 15 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/ChangeLog b/ChangeLog
t@@ -1,5 +1,7 @@
cvs
- Incorrect handling of WM_CLOSE under Win32 fixed
+ - Unix server now fails "gracefully" if it cannot create the Unix domain
+ socket for admin connections
1.5.4 03-03-2002
- Basic configuration file editor added to GTK+ client
(DIR) diff --git a/TODO b/TODO
t@@ -1,3 +1,7 @@
+- More complete Options dialog
+- Impose sensible limits on numbers in Options dialog (e.g. percentages)
+- Fix bug: data not updated in Options dialog if list box selection is cleared
+- Buttons in Options dialog should become sensitive only at applicable times
- Admin of running NT Service servers
- GSS_API SOCKS support?
- Fix problem with dialogs popping up while menus are open
(DIR) diff --git a/src/serverside.c b/src/serverside.c
t@@ -1096,6 +1096,10 @@ void ServerLoop()
#ifndef CYGWIN
localsock = SetupLocalSocket();
+ if (localsock == -1) {
+ dopelog(0, _("Could not set up Unix domain socket for admin "
+ "connections - check permissions on /tmp!"));
+ }
#endif
LineBuf = g_string_new("");
t@@ -1107,8 +1111,10 @@ void ServerLoop()
FD_SET(ListenSock, &errorfs);
topsock = ListenSock + 1;
#ifndef CYGWIN
- FD_SET(localsock, &readfs);
- topsock = MAX(topsock, localsock + 1);
+ if (localsock >= 0) {
+ FD_SET(localsock, &readfs);
+ topsock = MAX(topsock, localsock + 1);
+ }
for (list = localconn; list; list = g_slist_next(list)) {
NetworkBuffer *netbuf;
t@@ -1163,7 +1169,7 @@ void ServerLoop()
HandleNewConnection();
}
#ifndef CYGWIN
- if (FD_ISSET(localsock, &readfs)) {
+ if (localsock >= 0 && FD_ISSET(localsock, &readfs)) {
int newlocal;
NetworkBuffer *netbuf;