-static int cluster_recv_bundle(int more, uint8_t *p)
-{
- if (more >= MAXBUNDLE) {
- LOG(0, 0, 0, "DANGER: Received a bundle id > MAXBUNDLE!\n");
- return -1;
- }
-
- if (bundle[more].state == BUNDLEUNDEF) {
- if (config->cluster_iam_uptodate) { // Sanity.
- LOG(0, 0, 0, "I thought I was uptodate but I just found an undefined bundle!\n");
- } else {
- --config->cluster_undefined_bundles;
- }
- }
-
- memcpy(&bundle[more], p, sizeof(bundle[more]) );
-
- LOG(5, 0, more, "Received bundle update\n");
-
- if (!config->cluster_iam_uptodate)
- cluster_uptodate(); // Check to see if we're up to date.
-
- return 0;
-}
-