X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=etc%2Fafpd%2Ffiledir.c;h=c349f5322e1c4db5e51c810387ea8cdc6ece77c0;hp=5a23f28e4f2e2a631cca759654d138777303f83d;hb=dfae8b42d7696b7a845ae9ac8198656d288f05f3;hpb=22ad101eb72bf10fe5144526209798c677b2d1d8 diff --git a/etc/afpd/filedir.c b/etc/afpd/filedir.c index 5a23f28e..c349f532 100644 --- a/etc/afpd/filedir.c +++ b/etc/afpd/filedir.c @@ -248,7 +248,9 @@ static int moveandrename(struct vol *vol, if (!isdir) { if ((oldunixname = strdup(mtoupath(vol, oldname, sdir->d_did, utf8_encoding(vol->v_obj)))) == NULL) return AFPERR_PARAM; /* can't convert */ + AFP_CNID_START("cnid_get"); id = cnid_get(vol->v_cdb, sdir->d_did, oldunixname, strlen(oldunixname)); + AFP_CNID_DONE(); #ifndef HAVE_ATFUNCS /* Need full path */ @@ -378,7 +380,9 @@ static int moveandrename(struct vol *vol, } /* fix up the catalog entry */ + AFP_CNID_START("cnid_update"); cnid_update(vol->v_cdb, id, st, curdir->d_did, upath, strlen(upath)); + AFP_CNID_DONE(); } exit: @@ -521,10 +525,16 @@ int afp_delete(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size delcnid = deldir->d_did; dir_remove(vol, deldir); } - if (delcnid == CNID_INVALID) + if (delcnid == CNID_INVALID) { + AFP_CNID_START("cnid_get"); delcnid = cnid_get(vol->v_cdb, curdir->d_did, upath, strlen(upath)); - if (delcnid != CNID_INVALID) + AFP_CNID_DONE(); + } + if (delcnid != CNID_INVALID) { + AFP_CNID_START("cnid_delete"); cnid_delete(vol->v_cdb, delcnid); + AFP_CNID_DONE(); + } fce_register(FCE_DIR_DELETE, fullpathname(upath), NULL, fce_dir); } else { /* we have to cache this, the structs are lost in deletcurdir*/