| 254 | } |
| 255 | |
| 256 | static void receive_dr_binary_packet(bin_packet_t *pkt) |
| 257 | { |
| 258 | int rc = 0; |
| 259 | |
| 260 | LM_DBG("received a binary packet [%d]!\n", pkt->type); |
| 261 | |
| 262 | switch (pkt->type) { |
| 263 | case REPL_GW_STATUS_UPDATE: |
| 264 | ensure_bin_version(pkt, BIN_VERSION); |
| 265 | |
| 266 | rc = gw_status_update(pkt, 1); |
| 267 | break; |
| 268 | case REPL_CR_STATUS_UPDATE: |
| 269 | ensure_bin_version(pkt, BIN_VERSION); |
| 270 | |
| 271 | rc = cr_status_update(pkt); |
| 272 | break; |
| 273 | case SYNC_PACKET_TYPE: |
| 274 | _ensure_bin_version(pkt, BIN_VERSION, "drouting sync packet"); |
| 275 | |
| 276 | dr_recv_sync_packet(pkt); |
| 277 | break; |
| 278 | default: |
| 279 | LM_WARN("Invalid drouting binary packet command: %d " |
| 280 | "(from node: %d in cluster: %d)\n", |
| 281 | pkt->type, pkt->src_id, dr_cluster_id); |
| 282 | } |
| 283 | |
| 284 | if (rc != 0) |
| 285 | LM_ERR("failed to process binary packet!\n"); |
| 286 | } |
| 287 | |
| 288 | static int dr_recv_sync_request(int node_id) |
| 289 | { |
nothing calls this directly
no test coverage detected