#endif /* HAVE_CONFIG_H */
#include <stdio.h>
-
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-
-
+#include <stdbool.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
-#include <netatalk/at.h>
-
#include <atalk/adouble.h>
#include <atalk/vfs.h>
#include <atalk/logger.h>
}
}
-int fce_handle_coalescation( char *path, int is_dir, int mode )
+bool fce_handle_coalescation( char *path, int is_dir, int mode )
{
/* These two are used to eval our next index in history */
/* the history is unsorted, speed should not be a problem, length is 10 */
struct timeval tv;
if (coalesce == 0)
- return FALSE;
+ return false;
/* After a file creation *ALWAYS* a file modification is produced */
if ((mode == FCE_FILE_CREATE) && (coalesce & FCE_COALESCE_CREATE))
- return TRUE;
+ return true;
/* get timestamp */
gettimeofday(&tv, 0);
if ((coalesce & FCE_COALESCE_CREATE) && (fh->mode == FCE_DIR_CREATE)) {
/* Parent dir ? */
if (!strncmp(fh->path, path, strlen(fh->path)))
- return TRUE;
+ return true;
}
/* If we find a parent dir we should be DELETED we are done */
&& (mode == FCE_FILE_DELETE || mode == FCE_DIR_DELETE)) {
/* Parent dir ? */
if (!strncmp(fh->path, path, strlen(fh->path)))
- return TRUE;
+ return true;
}
/* Detect oldest entry for next new entry */
strncpy( fce_history_list[oldest_entry_idx].path, path, MAXPATHLEN);
/* we have to handle this event */
- return FALSE;
+ return false;
}
/*
* all|delete|create
*/
-int fce_set_coalesce(char *opt)
+int fce_set_coalesce(const char *opt)
{
char *e;
char *p;
}
free(e);
+
+ return AFP_OK;
}