From 1040882da196d0829b15cbe186feca445956a58a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 25 Nov 2007 19:11:50 +0100 Subject: [PATCH] com_setatt(): Generate an afs event if attributes were modified. --- afs.h | 2 +- attribute.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/afs.h b/afs.h index e30978b7..888003aa 100644 --- a/afs.h +++ b/afs.h @@ -66,7 +66,7 @@ struct rmatt_event_data { struct afsi_change_event_data { - const struct osl_row *aft_row; + struct osl_row *aft_row; struct afs_info *old_afsi; }; diff --git a/attribute.c b/attribute.c index 88b394ad..4acfd515 100644 --- a/attribute.c +++ b/attribute.c @@ -250,13 +250,13 @@ static int com_setatt_callback(const struct osl_object *query, (long long unsigned)del_mask); for (; p < (char *)query->data + query->size; p += len + 1) { /* TODO: fnmatch */ struct afs_info old_afsi, new_afsi; - struct osl_row *aft_row; + struct afsi_change_event_data aced = {.old_afsi = &old_afsi}; len = strlen(p); - ret = aft_get_row_of_path(p, &aft_row); + ret = aft_get_row_of_path(p, &aced.aft_row); if (ret < 0) return ret; - ret = get_afsi_object_of_row(aft_row, &obj); + ret = get_afsi_object_of_row(aced.aft_row, &obj); if (ret < 0) return ret; ret = load_afsi(&old_afsi, &obj); @@ -266,7 +266,7 @@ static int com_setatt_callback(const struct osl_object *query, new_afsi.attributes |= add_mask; new_afsi.attributes &= ~del_mask; save_afsi(&new_afsi, &obj); /* in-place update */ - // FIXME: Event? + afs_event(AFSI_CHANGE, NULL, &aced); } return 1; } -- 2.39.2