X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Ffce_api.c;h=b40eafb988a7bf6681faf8fc8a60a2ebcafc40a3;hb=6f45d8eaada82e401ecde525c689a67148b3ba1e;hp=01b4d2ec130f8fcb72bd8e691e76dbb4eecd0770;hpb=564374702f2964a25d2cd29b204c5a2f608dfb1a;p=netatalk.git diff --git a/etc/afpd/fce_api.c b/etc/afpd/fce_api.c index 01b4d2ec..b40eafb9 100644 --- a/etc/afpd/fce_api.c +++ b/etc/afpd/fce_api.c @@ -37,8 +37,6 @@ #include #include -#include - #include #include #include @@ -515,24 +513,15 @@ int fce_register_new_file( struct path *path ) int fce_register_file_modification( struct ofork *ofork ) { - char *u_name = NULL; - struct vol *vol; int ret = AFP_OK; - if (ofork == NULL || ofork->of_vol == NULL) + if (ofork == NULL) return AFPERR_PARAM; if (!(fce_ev_enabled & (1 << FCE_FILE_MODIFY))) return ret; - vol = ofork->of_vol; - - if (NULL == (u_name = mtoupath(vol, of_name(ofork), ofork->of_did, utf8_encoding()))) - { - return AFPERR_MISC; - } - - ret = register_fce( u_name, false, FCE_FILE_MODIFY ); + ret = register_fce(of_name(ofork), false, FCE_FILE_MODIFY ); return ret; } @@ -586,7 +575,7 @@ int fce_set_events(const char *events) fce_ev_enabled = 0; - for (p = strtok(e, ","); p; p = strtok(NULL, ",")) { + for (p = strtok(e, ", "); p; p = strtok(NULL, ", ")) { if (strcmp(p, "fmod") == 0) { fce_ev_enabled |= (1 << FCE_FILE_MODIFY); } else if (strcmp(p, "fdel") == 0) { @@ -603,6 +592,8 @@ int fce_set_events(const char *events) } free(e); + + return AFP_OK; } #ifdef FCE_TEST_MAIN