- cluster_send_message(cluster_address, vip_address, C_TUNNEL, packet, len);
+ cluster_send_message(config->cluster_address, vip_address, C_TUNNEL, packet, len);
+ free(packet);
+
+ return 1;
+}
+
+int cluster_send_goodbye()
+{
+ char *packet;
+ int len = 0;
+
+ packet = malloc(4096);
+
+ log(2, 0, 0, 0, "Sending goodbye to cluster master\n");
+ // Hostname
+ len = strlen(hostname);
+ *(char *)packet = len;
+ memcpy((char *)(packet + 1), hostname, len);
+ len++;
+
+ cluster_send_message(config->cluster_address, vip_address, C_GOODBYE, packet, len);