- /* this is just a extra clean up, so just send it
- and don't wait for an answer */
-
- msg.id_num = remote_id;
- daemon_addr.sin_addr = his_machine_addr;
- if (sendto(ctl_sockt, &msg, sizeof(CTL_MSG), 0, &daemon_addr,
- sizeof(daemon_addr)) != sizeof(CTL_MSG)) {
- perror("send_delete remote");
- }
-
- msg.id_num = local_id;
- daemon_addr.sin_addr = my_machine_addr;
- if (sendto(ctl_sockt, &msg, sizeof(CTL_MSG), 0, &daemon_addr,
- sizeof(daemon_addr)) != sizeof(CTL_MSG)) {
- perror("send_delete local");
- }
+ msg.type = DELETE;
+ /*
+ * This is just a extra clean up, so just send it
+ * and don't wait for an answer
+ */
+ msg.id_num = htonl(remote_id);
+ daemon_addr.sin_addr = his_machine_addr;
+ if (sendto(ctl_sockt, &msg, sizeof (msg), 0, &daemon_addr,
+ sizeof (daemon_addr)) != sizeof(msg))
+ perror("send_delete (remote)");
+ msg.id_num = htonl(local_id);
+ daemon_addr.sin_addr = my_machine_addr;
+ if (sendto(ctl_sockt, &msg, sizeof (msg), 0, &daemon_addr,
+ sizeof (daemon_addr)) != sizeof (msg))
+ perror("send_delete (local)");