Let afs_event() return int.
[paraslash.git] / attribute.c
index af1400c8a8e218d832d86cf0016a81388ab72f7b..5bb14ed43d813b8dc01498c29541e8410d4262b4 100644 (file)
@@ -280,7 +280,9 @@ static int com_addatt_callback(int fd, const struct osl_object *query)
                        goto out;
                aed.name = p;
                aed.bitnum = bitnum;
-               afs_event(ATTRIBUTE_ADD, &pb, &aed);
+               ret = afs_event(ATTRIBUTE_ADD, &pb, &aed);
+               if (ret < 0)
+                       goto out;
                greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, (int)bitnum);
        }
 out:
@@ -330,7 +332,7 @@ out:
        if (ret < 0)
                para_printf(&pb, "cannot rename %s to %s\n", old, new);
        else
-               afs_event(ATTRIBUTE_RENAME, &pb, NULL);
+               ret = afs_event(ATTRIBUTE_RENAME, &pb, NULL);
        flush_and_free_pb(&pb);
        return ret;
 }
@@ -361,8 +363,7 @@ static int remove_attribute(struct osl_table *table, struct osl_row *row,
                para_printf(pb, "cannot remove %s\n", name);
                return ret;
        }
-       afs_event(ATTRIBUTE_REMOVE, pb, &red);
-       return 1;
+       return afs_event(ATTRIBUTE_REMOVE, pb, &red);
 }
 
 static int com_rmatt_callback(int fd, const struct osl_object *query)