(1 << FCE_DIR_CREATE);
#define MAXIOBUF 1024
-static char iobuf[MAXIOBUF];
+static unsigned char iobuf[MAXIOBUF];
static const char *skip_files[] =
{
".DS_Store",
{
size_t pathlen = 0;
ssize_t data_len = 0;
- uint64_t *t;
/* Set content of packet */
memcpy(packet->magic, FCE_PACKET_MAGIC, sizeof(packet->magic) );
static bool first_event = true;
struct fce_packet packet;
- void *data = &packet;
static uint32_t event_id = 0; /* the unique packet couter to detect packet/data loss. Going from 0xFFFFFFFF to 0x0 is a valid increment */
time_t now = time(NULL);
return AFP_OK;
AFP_ASSERT(event >= FCE_FIRST_EVENT && event <= FCE_LAST_EVENT);
+ AFP_ASSERT(path);
LOG(log_debug, logtype_fce, "register_fce(path: %s, type: %s, event: %s",
- path , type == fce_dir ? "dir" : "file", fce_event_names[event]);
+ path, type == fce_dir ? "dir" : "file", fce_event_names[event]);
bname = basename_safe(path);
/* No listeners configured */
return AFP_OK;
- if (path == NULL)
- return AFPERR_PARAM;
/* do some initialization on the fly the first time */
if (first_event) {
* */
void fce_pending_events(AFPObj *obj)
{
+ if (!udp_sockets)
+ return;
check_saved_close_events(obj->options.fce_fmodwait);
}
}
int main( int argc, char*argv[] )
{
- int c,ret;
+ int c;
char *port = FCE_DEFAULT_PORT_STRING;
char *host = "localhost";