]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
attribute.c: Remove struct addatt_event_data().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 14 Mar 2022 22:22:58 +0000 (23:22 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Oct 2022 18:36:21 +0000 (20:36 +0200)
It is passed to afs_event() to tell the table event handlers the
name and bit number of the newly added attribute. However, the only
table which does not ignore attribute add events is the mood table,
and this just reloads the current mood without even looking at the
information passed.

attribute.c

index fb1b3eac3482f1c0725e0e79a4b80166be511350..3ff70cb279d80b82f14520760bac2eec5b3576da 100644 (file)
@@ -168,11 +168,6 @@ static int com_lsatt(struct command_context *cc, struct lls_parse_result *lpr)
 }
 EXPORT_SERVER_CMD_HANDLER(lsatt);
 
-struct addatt_event_data {
-       const char *name;
-       unsigned char bitnum;
-};
-
 static int com_addatt_callback(struct afs_callback_arg *aca)
 {
        const struct lls_command *cmd = SERVER_CMD_CMD_PTR(ADDATT);
@@ -188,7 +183,6 @@ static int com_addatt_callback(struct afs_callback_arg *aca)
                struct osl_object objs[NUM_ATT_COLUMNS];
                struct osl_row *row;
                unsigned char bitnum;
-               struct addatt_event_data aed;
 
                len = strlen(name);
                if (len == 0 || name[len - 1] == '-' || name[len - 1] == '+') {
@@ -225,9 +219,7 @@ static int com_addatt_callback(struct afs_callback_arg *aca)
                ret = osl(osl_add_row(attribute_table, objs));
                if (ret < 0)
                        goto out;
-               aed.name = name;
-               aed.bitnum = bitnum;
-               ret = afs_event(ATTRIBUTE_ADD, &aca->pbout, &aed);
+               ret = afs_event(ATTRIBUTE_ADD, &aca->pbout, NULL);
                if (ret < 0)
                        goto out;
                greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, (int)bitnum);