From 6de1db9ba405eb0d04ec76eb24285b82ed28ef55 Mon Sep 17 00:00:00 2001 From: Mark Haverkamp Date: Thu, 17 Mar 2005 18:12:22 +0000 Subject: [PATCH] Handle possible SA_AIS_ERR_TRY_AGAIN status. (Logical change 1.152) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@536 fd59a12c-fef9-0310-b244-a6a79926bd2f --- test/publish.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/publish.c b/test/publish.c index cd08036f..1d92f16c 100644 --- a/test/publish.c +++ b/test/publish.c @@ -155,8 +155,10 @@ test_pub() printf("Event Initialize result: %s\n", result_buf); exit(result); } - result = saEvtChannelOpen(handle, &channel_name, flags, 0, + do { + result = saEvtChannelOpen(handle, &channel_name, flags, 0, &channel_handle); + } while (result == SA_AIS_ERR_TRY_AGAIN); if (result != SA_AIS_OK) { get_sa_error(result, result_buf, result_buf_len); printf("channel open result: %s\n", result_buf); @@ -271,14 +273,18 @@ test_pub() exit(result); } - result = saEvtChannelClose(channel_handle); + do { + result = saEvtChannelClose(channel_handle); + } while (result == SA_AIS_ERR_TRY_AGAIN); if (result != SA_AIS_OK) { get_sa_error(result, result_buf, result_buf_len); printf("channel close result: %s\n", result_buf); exit(result); } - result = saEvtFinalize(handle); + do { + result = saEvtFinalize(handle); + } while (result == SA_AIS_ERR_TRY_AGAIN); if (result != SA_AIS_OK) { get_sa_error(result, result_buf, result_buf_len);