public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: master - config: kill dead code Date: Mon, 23 Mar 2009 18:41:00 -0000 [thread overview] Message-ID: <20090323184112.DFC001201C2@lists.fedorahosted.org> (raw) 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;
reply other threads:[~2009-03-23 18:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090323184112.DFC001201C2@lists.fedorahosted.org \ --to=fabbione@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).