public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - config: kill dead code
@ 2009-03-23 18:41 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-03-23 18:41 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=25ab811cdd1be2d1593405836719de5a06684d98
Commit: 25ab811cdd1be2d1593405836719de5a06684d98
Parent: ab7cfa4fc10c5ec6a03b3c4cad7dc94a2dfbb047
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Mon Mar 23 19:38:56 2009 +0100
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Mon Mar 23 19:41:03 2009 +0100
config: kill dead code
remove all EXPERIMENTAL code.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
config/libs/libccsconfdb/ccs.h | 4 --
config/libs/libccsconfdb/libccs.c | 71 -------------------------------------
2 files changed, 0 insertions(+), 75 deletions(-)
diff --git a/config/libs/libccsconfdb/ccs.h b/config/libs/libccsconfdb/ccs.h
index b85a69b..bf2c8e1 100644
--- a/config/libs/libccsconfdb/ccs.h
+++ b/config/libs/libccsconfdb/ccs.h
@@ -17,8 +17,4 @@ void ccs_read_logging(int fd, char *name, int *debug, int *mode,
int *logfile_priority, char *logfile);
extern int fullxpath;
-#ifdef EXPERIMENTAL_BUILD
-extern int ccs_persistent_conn;
-#endif
-
#endif /* __CCS_DOT_H__ */
diff --git a/config/libs/libccsconfdb/libccs.c b/config/libs/libccsconfdb/libccs.c
index 0eb33de..c24bead 100644
--- a/config/libs/libccsconfdb/libccs.c
+++ b/config/libs/libccsconfdb/libccs.c
@@ -6,23 +6,10 @@
#include <limits.h>
#include <corosync/corotypes.h>
#include <corosync/confdb.h>
-#ifdef EXPERIMENTAL_BUILD
-#include <time.h>
-#endif
#include "ccs.h"
#include "ccs_internal.h"
-#ifdef EXPERIMENTAL_BUILD
-#ifndef CCS_HANDLE_TIMEOUT
-#define CCS_HANDLE_TIMEOUT 60 /* 60 seconds */
-#endif
-#endif
-
-#ifdef EXPERIMENTAL_BUILD
-int ccs_persistent_conn = 0;
-#endif
-
/* Callbacks are not supported - we will use them to update fullxml doc/ctx */
static confdb_callbacks_t callbacks = {
};
@@ -236,9 +223,6 @@ static hdb_handle_t create_ccs_handle(confdb_handle_t handle, int ccs_handle,
hdb_handle_t libccs_handle = 0, connection_handle = 0;
char buf[128];
int config_version = 0;
-#ifdef EXPERIMENTAL_BUILD
- time_t current_time;
-#endif
libccs_handle = find_libccs_handle(handle);
if (libccs_handle == -1)
@@ -283,21 +267,6 @@ static hdb_handle_t create_ccs_handle(confdb_handle_t handle, int ccs_handle,
errno = ENOMEM;
return -1;
}
-#ifdef EXPERIMENTAL_BUILD
- if (ccs_persistent_conn)
- return connection_handle;
-
- memset(buf, 0, sizeof(buf));
- time(¤t_time);
- memcpy(buf, ¤t_time, sizeof(time_t));
- if (confdb_key_create
- (handle, connection_handle, "last_access", strlen("last_access"),
- buf, sizeof(time_t)) != CS_OK) {
- destroy_ccs_handle(handle, connection_handle);
- errno = ENOMEM;
- return -1;
- }
-#endif
return connection_handle;
}
@@ -435,42 +404,6 @@ void reset_iterator(confdb_handle_t handle, hdb_handle_t connection_handle)
return;
}
-#ifdef EXPERIMENTAL_BUILD
-static int clean_stalled_ccs_handles(confdb_handle_t handle)
-{
- int datalen = 0;
- hdb_handle_t libccs_handle = 0, connection_handle = 0;
- time_t current_time, stored_time;
-
- libccs_handle = find_libccs_handle(handle);
- if (libccs_handle == -1)
- return -1;
-
- if (confdb_object_find_start(handle, libccs_handle) != CS_OK) {
- errno = ENOMEM;
- return -1;
- }
-
- time(¤t_time);
-
- while (confdb_object_find
- (handle, libccs_handle, "connection", strlen("connection"),
- &connection_handle) == CS_OK) {
- if (confdb_key_get
- (handle, connection_handle, "last_access",
- strlen("last_access"), &stored_time,
- &datalen) == CS_OK) {
- if ((current_time - stored_time) > CCS_HANDLE_TIMEOUT)
- destroy_ccs_handle(handle, connection_handle);
- }
- }
-
- confdb_object_find_destroy(handle, libccs_handle);
-
- return 0;
-}
-#endif
-
static int check_cluster_name(int ccs_handle, const char *cluster_name)
{
confdb_handle_t handle = 0;
@@ -588,10 +521,6 @@ int ccs_connect(void)
if (handle == -1)
return handle;
-#ifdef EXPERIMENTAL_BUILD
- clean_stalled_ccs_handles(handle);
-#endif
-
get_ccs_handle(handle, &ccs_handle, fullxpath);
if (ccs_handle < 0)
goto fail;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-23 18:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 18:41 cluster: master - config: kill dead code Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).