浏览代码

Fix dispatch returning TRY_AGAIN when using DISPATCH_ALL parameter because of
regression caused by revision 2046:lib/coroipcc.c.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2415 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 16 年之前
父节点
当前提交
c14c130df5
共有 6 个文件被更改,包括 12 次插入9 次删除
  1. 1 2
      lib/cfg.c
  2. 1 1
      lib/confdb.c
  3. 1 2
      lib/cpg.c
  4. 1 2
      lib/evs.c
  5. 7 0
      lib/quorum.c
  6. 1 2
      lib/votequorum.c

+ 1 - 2
lib/cfg.c

@@ -181,8 +181,7 @@ corosync_cfg_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
-
-		if (dispatch_data == NULL) {
+		if (error == CS_ERR_TRY_AGAIN) {
 			if (dispatch_flags == CPG_DISPATCH_ALL) {
 				break; /* exit do while cont is 1 loop */
 			} else {

+ 1 - 1
lib/confdb.c

@@ -316,7 +316,7 @@ cs_error_t confdb_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
-		if (dispatch_data == NULL) {
+		if (error == CS_ERR_TRY_AGAIN) {
 			if (dispatch_types == CONFDB_DISPATCH_ALL) {
 				break; /* exit do while cont is 1 loop */
 			} else {

+ 1 - 2
lib/cpg.c

@@ -292,8 +292,7 @@ cs_error_t cpg_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
-
-		if (dispatch_data == NULL) {
+		if (error == CS_ERR_TRY_AGAIN) {
 			if (dispatch_types == CPG_DISPATCH_ALL) {
 				break; /* exit do while cont is 1 loop */
 			} else {

+ 1 - 2
lib/evs.c

@@ -258,8 +258,7 @@ evs_error_t evs_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
-
-		if (dispatch_data == NULL) {
+		if (error == CS_ERR_TRY_AGAIN) {
 			if (dispatch_types == CPG_DISPATCH_ALL) {
 				break; /* exit do while cont is 1 loop */
 			} else {

+ 7 - 0
lib/quorum.c

@@ -365,6 +365,13 @@ cs_error_t quorum_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
+		if (error == CS_ERR_TRY_AGAIN) {
+			if (dispatch_types == CPG_DISPATCH_ALL) {
+				break; /* exit do while cont is 1 loop */
+			} else {
+				continue; /* next poll */
+			}
+		}
 
 		/*
 		 * Make copy of callbacks, message data, unlock instance, and call callback

+ 1 - 2
lib/votequorum.c

@@ -719,8 +719,7 @@ cs_error_t votequorum_dispatch (
 		if (error != CS_OK) {
 			goto error_put;
 		}
-
-		if (dispatch_data == NULL) {
+		if (error == CS_ERR_TRY_AGAIN) {
 			if (dispatch_types == CPG_DISPATCH_ALL) {
 				break; /* exit do while cont is 1 loop */
 			} else {