+ else
+ {
+ char alert_msg[OS_MAXSTR +1];
+ char c_sum[256 +2];
+
+ c_sum[0] = '\0';
+ c_sum[256] = '\0';
+ alert_msg[0] = '\0';
+ alert_msg[OS_MAXSTR] = '\0';
+
+ /* If it returns < 0, we will already have alerted. */
+ if(c_read_file(file_name, buf, c_sum) < 0)
+ return(0);
+
+ if(strcmp(c_sum, buf+6) != 0)
+ {
+ /* Sending the new checksum to the analysis server */
+ alert_msg[OS_MAXSTR] = '\0';
+ #ifdef WIN32
+ snprintf(alert_msg, 916, "%s %s", c_sum, file_name);
+ #else
+ char *fullalert = NULL;
+ if(buf[5] == 's' || buf[5] == 'n')
+ {
+ fullalert = seechanges_addfile(file_name);
+ if(fullalert)
+ {
+ snprintf(alert_msg, OS_MAXSTR, "%s %s\n%s", c_sum, file_name, fullalert);
+ free(fullalert);
+ fullalert = NULL;
+ }
+ else
+ {
+ snprintf(alert_msg, 916, "%s %s", c_sum, file_name);
+ }
+ }
+ else
+ {
+ snprintf(alert_msg, 916, "%s %s", c_sum, file_name);
+ }
+ #endif
+ send_syscheck_msg(alert_msg);
+ }
+ }
+
+