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
This commit is contained in:
Mark Haverkamp 2005-03-17 18:12:22 +00:00
parent 1e3efb5ec5
commit 6de1db9ba4

View File

@ -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);