- sendto(sock, msgbuf, len, 0, (struct sockaddr *) &dest, sizeof(dest));
+ if (sendto(sock, msgbuf, len, 0, (struct sockaddr *) &dest, sizeof(dest)) < 0)
+ nsm_log(LOG_WARNING, "Sending Reboot Notification to "
+ "'%s' failed: errno %d (%s)", host->name, errno, strerror(errno));
+
+ return 0;