#include <atalk/util.h>
#include <atalk/bstrlib.h>
#include <atalk/bstradd.h>
+#include <atalk/globals.h>
#include "desktop.h"
#include "directory.h"
#include "dircache.h"
#include "volume.h"
-#include "globals.h"
#include "file.h"
#include "fork.h"
#include "filedir.h"
sd.sd_last = sd.sd_buf;
/* if dir was in the cache we don't have the inode */
if (( !o_path->st_valid && lstat( ".", &o_path->st ) < 0 ) ||
- (ret = for_each_dirent(vol, ".", enumerate_loop, (void *)&sd)) < 0)
+ (ret = for_each_dirent(vol, ".", enumerate_loop, (void *)&sd)) < 0)
{
+ LOG(log_error, logtype_afpd, "enumerate: loop error: %s (%d)", strerror(errno), errno);
switch (errno) {
case EACCES:
- return AFPERR_ACCESS;
+ return AFPERR_ACCESS;
case ENOTDIR:
return AFPERR_BADTYPE;
case ENOMEM:
*/
*sd.sd_last = 0;
sd.sd_last += len + 1;
- curdir->offcnt--; /* a little lie */
+ curdir->d_offcnt--; /* a little lie */
continue;
}
continue;
}
int len = strlen(s_path.u_name);
- if ((dir = dircache_search_by_name(vol, curdir, s_path.u_name, len, s_path.st.st_ctime)) == NULL) {
+ if ((dir = dircache_search_by_name(vol, curdir, s_path.u_name, len)) == NULL) {
if ((dir = dir_add(vol, curdir, &s_path, len)) == NULL) {
LOG(log_error, logtype_afpd, "enumerate(vid:%u, did:%u, name:'%s'): error adding dir: '%s'",
ntohs(vid), ntohl(did), o_path->u_name, s_path.u_name);