The selection object get in sync with openAsync doesn't work.

(Logical change 1.199)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@648 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2005-06-06 20:12:20 +00:00
parent 0bc85fe79e
commit 695ea081d9

View File

@ -35,6 +35,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
@ -230,7 +231,7 @@ saCkptSelectionObjectGet (
return (error);
}
*selectionObject = ckptInstance->response_fd;
*selectionObject = ckptInstance->dispatch_fd;
saHandleInstancePut (&ckptHandleDatabase, ckptHandle);
@ -252,6 +253,7 @@ saCkptDispatch (
int cont = 1; /* always continue do loop except when set to 0 */
struct message_overlay dispatch_data;
struct res_lib_ckpt_checkpointopenasync *res_lib_ckpt_checkpointopenasync;
struct ckptCheckpointInstance *ckptCheckpointInstance;
error = saHandleInstanceGet (&ckptHandleDatabase, ckptHandle, (void *)&ckptInstance);
@ -333,6 +335,20 @@ saCkptDispatch (
case MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC:
res_lib_ckpt_checkpointopenasync = (struct res_lib_ckpt_checkpointopenasync *) &dispatch_data;
/*
* This instance get/listadd/put required so that close
* later has the proper list of checkpoints
*/
error = saHandleInstanceGet (&checkpointHandleDatabase,
res_lib_ckpt_checkpointopenasync->checkpointHandle,
(void *)&ckptCheckpointInstance);
assert (error == SA_AIS_OK); /* should only be valid handles here */
list_add (&ckptCheckpointInstance->list,
&ckptInstance->checkpoint_list);
saHandleInstancePut (&checkpointHandleDatabase,
ckptCheckpointInstance->checkpointHandle);
callbacks.saCkptCheckpointOpenCallback(res_lib_ckpt_checkpointopenasync->invocation,
res_lib_ckpt_checkpointopenasync->checkpointHandle,
res_lib_ckpt_checkpointopenasync->header.error);