static const char **skip_files;
static struct fce_close_event last_close_event;
-static char *fce_event_names[] = {
+/*
+ * This only initializes consecutive events beginning at 1, high
+ * numbered events must be initialized in the code
+ */
+static char *fce_event_names[FCE_LAST_EVENT + 1] = {
"",
"FCE_FILE_MODIFY",
"FCE_FILE_DELETE",
if (first_event == true) {
first_event = false;
+ fce_event_names[FCE_CONN_START] = "FCE_CONN_START";
+ fce_event_names[FCE_CONN_BROKEN] = "FCE_CONN_BROKEN";
+
struct passwd *pwd = getpwuid(obj->uid);
user = strdup(pwd->pw_name);
}
/* build our data packet */
- data_len = build_fce_packet(obj, iobuf, event, path, oldpath, getpid(), user, ++event_id);
+ data_len = build_fce_packet(obj, iobuf, event, path, oldpath, getpid(), user, event_id);
sent_data = sendto(udp_entry->sock,
iobuf,
udp_entry->next_try_on_error = now + FCE_SOCKET_RETRY_DELAY_S;
}
}
+
+ event_id++;
}
static int add_udp_socket(const char *target_ip, const char *target_port )