| 234 | } |
| 235 | |
| 236 | static cs_error_t sam_cmap_register (void) |
| 237 | { |
| 238 | cs_error_t err; |
| 239 | cmap_handle_t cmap_handle; |
| 240 | |
| 241 | if ((err = cmap_initialize (&cmap_handle)) != CS_OK) { |
| 242 | return (err); |
| 243 | } |
| 244 | |
| 245 | snprintf(sam_internal_data.cmap_pid_path, CMAP_KEYNAME_MAXLEN, "resources.process.%d.", getpid()); |
| 246 | |
| 247 | sam_internal_data.cmap_handle = cmap_handle; |
| 248 | |
| 249 | if ((err = sam_cmap_update_key (SAM_CMAP_KEY_RECOVERY, NULL)) != CS_OK) { |
| 250 | goto destroy_finalize_error; |
| 251 | } |
| 252 | |
| 253 | if ((err = sam_cmap_update_key (SAM_CMAP_KEY_HC_PERIOD, NULL)) != CS_OK) { |
| 254 | goto destroy_finalize_error; |
| 255 | } |
| 256 | |
| 257 | return (CS_OK); |
| 258 | |
| 259 | destroy_finalize_error: |
| 260 | sam_cmap_destroy_pid_path (); |
| 261 | cmap_finalize (cmap_handle); |
| 262 | return (err); |
| 263 | } |
| 264 | |
| 265 | static void quorum_notification_fn ( |
| 266 | quorum_handle_t handle, |
no test coverage detected