| 207 | } |
| 208 | |
| 209 | cs_error_t quorum_finalize ( |
| 210 | quorum_handle_t handle) |
| 211 | { |
| 212 | struct quorum_inst *quorum_inst; |
| 213 | cs_error_t error; |
| 214 | |
| 215 | error = hdb_error_to_cs(hdb_handle_get (&quorum_handle_t_db, handle, (void *)&quorum_inst)); |
| 216 | if (error != CS_OK) { |
| 217 | return (error); |
| 218 | } |
| 219 | |
| 220 | /* |
| 221 | * Another thread has already started finalizing |
| 222 | */ |
| 223 | if (quorum_inst->finalize) { |
| 224 | (void)hdb_handle_put (&quorum_handle_t_db, handle); |
| 225 | return (CS_ERR_BAD_HANDLE); |
| 226 | } |
| 227 | |
| 228 | quorum_inst->finalize = 1; |
| 229 | |
| 230 | (void)hdb_handle_destroy (&quorum_handle_t_db, handle); |
| 231 | |
| 232 | (void)hdb_handle_put (&quorum_handle_t_db, handle); |
| 233 | |
| 234 | return (CS_OK); |
| 235 | } |
| 236 | |
| 237 | cs_error_t quorum_getquorate ( |
| 238 | quorum_handle_t handle, |
no test coverage detected