[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3154 - in GNUnet: . src/include src/server src/util/config
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3154 - in GNUnet: . src/include src/server src/util/config |
Date: |
Sat, 29 Jul 2006 01:11:48 -0700 (PDT) |
Author: grothoff
Date: 2006-07-29 01:11:46 -0700 (Sat, 29 Jul 2006)
New Revision: 3154
Modified:
GNUnet/configure.ac
GNUnet/src/include/gnunet_util_threads.h
GNUnet/src/server/gnunetd.c
GNUnet/src/server/startup.c
GNUnet/src/server/tcpserver.c
GNUnet/src/util/config/config.c
GNUnet/todo
Log:
better yesno, more code for server
Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/configure.ac 2006-07-29 08:11:46 UTC (rev 3154)
@@ -565,6 +565,7 @@
src/util/getopt/Makefile
src/util/loggers/Makefile
src/util/network/Makefile
+src/util/network_client/Makefile
src/util/os/Makefile
src/util/string/Makefile
src/util/threads/Makefile
Modified: GNUnet/src/include/gnunet_util_threads.h
===================================================================
--- GNUnet/src/include/gnunet_util_threads.h 2006-07-29 08:04:48 UTC (rev
3153)
+++ GNUnet/src/include/gnunet_util_threads.h 2006-07-29 08:11:46 UTC (rev
3154)
@@ -170,7 +170,7 @@
/**
* Programatically shutdown the application.
*/
-void GNUNET_SHUTDOWN_INIITATE(void);
+void GNUNET_SHUTDOWN_INITIATE(void);
/**
* Test if the shutdown has been initiated.
Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/src/server/gnunetd.c 2006-07-29 08:11:46 UTC (rev 3154)
@@ -99,11 +99,14 @@
struct LoadMonitor * mon;
struct SignalHandlerContext * shc_hup;
int filedes[2]; /* pipe between client and parent */
+ int debug_flag;
- if ( (NO == GC_get_configuration_value_yesno(cfg,
- "GNUNETD",
- "DEBUG",
- NO)) &&
+
+ debug_flag = GC_get_configuration_value_yesno(cfg,
+ "GNUNETD",
+ "DEBUG",
+ NO);
+ if ( (NO == debug_flag) &&
(OK != os_terminal_detach(ectx,
filedes)) )
return SYSERR;
@@ -118,7 +121,7 @@
initConnection();
loadApplicationModules();
writePIDFile(ectx, cfg);
- if (NO == debug_flag())
+ if (NO == debug_flag)
os_terminal_detach_complete(ectx,
filedes,
YES);
Modified: GNUnet/src/server/startup.c
===================================================================
--- GNUnet/src/server/startup.c 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/src/server/startup.c 2006-07-29 08:11:46 UTC (rev 3154)
@@ -74,7 +74,7 @@
GE_WARNING | GE_ADMIN | GE_BULK,
"fprintf",
pif);
- if (0 != FCLOSE(pidfd))
+ if (0 != fclose(pidfd))
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"fclose",
Modified: GNUnet/src/server/tcpserver.c
===================================================================
--- GNUnet/src/server/tcpserver.c 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/src/server/tcpserver.c 2006-07-29 08:11:46 UTC (rev 3154)
@@ -92,7 +92,7 @@
ip);
}
-static int shutdownHandler(ClientHandle client,
+static int shutdownHandler(struct ClientHandle * client,
const MESSAGE_HEADER * msg) {
int ret;
@@ -273,12 +273,11 @@
cfg = c;
ectx = e;
-#if 0
- if (testConfigurationString("TCPSERVER",
- "DISABLE",
- "YES"))
+ if (YES == GC_get_configuration_value_yesno(cfg,
+ "TCPSERVER",
+ "DISABLE",
+ NO))
return OK;
-#endif
/* move to reload-configuration method! */
ch = NULL;
@@ -362,6 +361,8 @@
0 /* no memory quota */);
if (selector == NULL)
return SYSERR;
+ registerCSHandler(CS_PROTO_SHUTDOWN_REQUEST,
+ &shutdownHandler);
return OK;
}
@@ -369,12 +370,13 @@
* Shutdown the module.
*/
int stopTCPServer() {
-#if 0
- if (testConfigurationString("TCPSERVER",
- "DISABLE",
- "YES"))
+ if (YES == GC_get_configuration_value_yesno(cfg,
+ "TCPSERVER",
+ "DISABLE",
+ NO))
return OK;
-#endif
+ unregisterCSHandler(CS_PROTO_SHUTDOWN_REQUEST,
+ &shutdownHandler);
GE_ASSERT(ectx, selector != NULL);
select_destroy(selector);
return OK;
Modified: GNUnet/src/util/config/config.c
===================================================================
--- GNUnet/src/util/config/config.c 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/src/util/config/config.c 2006-07-29 08:11:46 UTC (rev 3154)
@@ -26,6 +26,7 @@
*/
#include "gnunet_util_config_impl.h"
+#include "platform.h"
void GC_free(struct GC_Configuration * cfg) {
cfg->free(cfg);
@@ -97,11 +98,12 @@
ret = GC_get_configuration_value_choice(cfg,
section,
option,
+ yesno,
def == YES ? "YES" : "NO",
&val);
if (ret == -1)
return SYSERR;
- if (ret == yesno[0])
+ if (val == yesno[0])
return YES;
return NO;
}
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-07-29 08:04:48 UTC (rev 3153)
+++ GNUnet/todo 2006-07-29 08:11:46 UTC (rev 3154)
@@ -11,14 +11,17 @@
Oh, and this is of course just a plan. And plans always change.
+NILS:
+* FCLOSE not in plibc? (using fclose for now)
+
+
0.7.1 ['06] (aka "stabilization")
-- finish util refactoring:
+- finish util refactoring: [RC]
* util:
+ network/io: load monitor support
+ loggers: SMTP logger
* transports:
- + TCP: setBlocking for select pipe
- + SMTP/HTTP/IPv6: do not yet compile
+ + SMTP/HTTP: do not yet compile (commented out from build)
* core:
+ nothing compiles
+ add support for extended core API fields
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3154 - in GNUnet: . src/include src/server src/util/config,
grothoff <=