[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/lib libcman.c libcman.h



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]