cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cman/lib libcman.c libcman.h
Date: 9 Nov 2007 12:51:58 -0000	[thread overview]
Message-ID: <20071109125158.30554.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione at sourceware.org	2007-11-09 12:51:58

Modified files:
	cman/lib       : libcman.c libcman.h 

Log message:
	Remove cman_wait_init for now. It was becoming overly complicated for such
	simple task.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.c.diff?cvsroot=cluster&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.36&r2=1.37

--- cluster/cman/lib/libcman.c	2007/11/05 16:43:50	1.38
+++ cluster/cman/lib/libcman.c	2007/11/09 12:51:58	1.39
@@ -354,61 +354,6 @@
 	return open_socket(CLIENT_SOCKNAME, sizeof(CLIENT_SOCKNAME), privdata);
 }
 
-/* cman_wait_init
- *
- * @admin: set to 0 for standard socket, != 0 for admin socket
- * @ctimeout: connection timeout in second to attempt to connect to cman.
- *            0 = wait forever, -1 = do not wait.
- * @qtimeout: cluster quorum timeout in second.
- *            0 = wait forever, -1 = do not wait.
- * @privdata: see cman_admin_init and cman_init.
- */
-
-cman_handle_t cman_wait_init(int admin, int ctimeout, int qtimeout, void *privdata)
-{
-	cman_handle_t ch;
-	int i = 0;
-
-	if (!ctimeout)
-		i = 1;
-
-	while (ctimeout != i) {
-
-		if (admin) {
-			ch = cman_admin_init(privdata);
-		} else {
-			ch = cman_init(privdata);
-		}
-
-		if ((ch) || (ctimeout = -1)) {
-			i = ctimeout;
-		} else {
-			sleep(1);
-			i++;
-		}
-	}
-
-	if (!ch)
-		return ch;
-
-	if (!qtimeout) {
-		i = 1;
-	} else {
-		i = 0;
-	}
-
-	while (qtimeout != i) {
-		if ((cman_is_quorate(ch)) || (qtimeout = -1)) {
-			i = qtimeout;
-		} else {
-			sleep(1);
-			i++;
-		}
-	}
-
-	return ch;
-}
-
 int cman_finish(cman_handle_t handle)
 {
 	struct cman_handle *h = (struct cman_handle *)handle;
--- cluster/cman/lib/libcman.h	2007/11/05 16:43:50	1.36
+++ cluster/cman/lib/libcman.h	2007/11/09 12:51:58	1.37
@@ -203,7 +203,6 @@
  */
 cman_handle_t cman_init(void *privdata);
 cman_handle_t cman_admin_init(void *privdata);
-cman_handle_t cman_wait_init(int admin, int ctimeout, int qtimeout, void *privdata);
 int cman_finish(cman_handle_t handle);
 
 /* Update/retrieve the private data */



             reply	other threads:[~2007-11-09 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 12:51 fabbione [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-05 16:43 [Cluster-devel] cluster/cman/lib libcman.c libcman.h fabbione
2007-05-02 10:27 pcaulfield
2006-07-11  8:13 pcaulfield
2006-07-11 19:57 ` Lon Hohberger

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=20071109125158.30554.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    /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: link
Be 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 NNTP newsgroup(s).