mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-14 02:37:40 +00:00
defect 717
if checkpoint is not writeable in durationset, return error git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@755 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
63ba2f7a17
commit
6574c5f172
14
lib/ckpt.c
14
lib/ckpt.c
@ -1075,12 +1075,19 @@ saCkptSectionExpirationTimeSet (
|
||||
if (sectionId == NULL) {
|
||||
return (SA_AIS_ERR_INVALID_PARAM);
|
||||
}
|
||||
|
||||
error = saHandleInstanceGet (&checkpointHandleDatabase, checkpointHandle,
|
||||
(void *)&ckptCheckpointInstance);
|
||||
if (error != SA_AIS_OK) {
|
||||
goto error_exit_noput;
|
||||
return (error);
|
||||
}
|
||||
|
||||
if ((ckptCheckpointInstance->checkpointOpenFlags & SA_CKPT_CHECKPOINT_WRITE) == 0) {
|
||||
error = SA_AIS_ERR_ACCESS;
|
||||
goto error_put;
|
||||
}
|
||||
|
||||
|
||||
req_lib_ckpt_sectionexpirationtimeset.header.size = sizeof (struct req_lib_ckpt_sectionexpirationtimeset) + sectionId->idLen;
|
||||
req_lib_ckpt_sectionexpirationtimeset.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET;
|
||||
req_lib_ckpt_sectionexpirationtimeset.idLen = sectionId->idLen;
|
||||
@ -1113,11 +1120,12 @@ saCkptSectionExpirationTimeSet (
|
||||
sizeof (struct res_lib_ckpt_sectionexpirationtimeset),
|
||||
MSG_WAITALL | MSG_NOSIGNAL);
|
||||
|
||||
error_exit:
|
||||
pthread_mutex_unlock (&ckptCheckpointInstance->response_mutex);
|
||||
|
||||
error_exit:
|
||||
error_put:
|
||||
saHandleInstancePut (&checkpointHandleDatabase, checkpointHandle);
|
||||
error_exit_noput:
|
||||
|
||||
return (error == SA_AIS_OK ? res_lib_ckpt_sectionexpirationtimeset.header.error : error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user