| 495 | } |
| 496 | |
| 497 | static void add_track(cmap_handle_t handle, const char *key_name, int prefix) |
| 498 | { |
| 499 | cmap_track_handle_t track_handle; |
| 500 | int32_t track_type; |
| 501 | cs_error_t err; |
| 502 | |
| 503 | track_type = CMAP_TRACK_ADD | CMAP_TRACK_DELETE | CMAP_TRACK_MODIFY; |
| 504 | if (prefix) { |
| 505 | track_type |= CMAP_TRACK_PREFIX; |
| 506 | } |
| 507 | |
| 508 | err = cmap_track_add(handle, key_name, track_type, cmap_notify_fn, NULL, &track_handle); |
| 509 | if (err != CS_OK) { |
| 510 | fprintf(stderr, "Failed to add tracking function. Error %s\n", cs_strerror(err)); |
| 511 | exit (EXIT_FAILURE); |
| 512 | } |
| 513 | } |
| 514 | |
| 515 | static void track_changes(cmap_handle_t handle) |
| 516 | { |
no test coverage detected