X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=attribute.c;h=801d907ab714b254dae7415d21ccc6c675484835;hb=f3c29f0f4c000f3d860c0da31d4387afc798a77a;hp=66312b2acb06f5a5919c5a04198db2cae2f0b34a;hpb=d67659cc56f7ebc6b05738d8e15ecb0de86528b1;p=paraslash.git diff --git a/attribute.c b/attribute.c index 66312b2a..801d907a 100644 --- a/attribute.c +++ b/attribute.c @@ -10,7 +10,7 @@ #include "string.h" #include "net.h" -static void *attribute_table; +static struct osl_table *attribute_table; static int greatest_att_bitnum; /** The columns of the attribute table. */ @@ -320,7 +320,7 @@ static int com_addatt_callback(const struct osl_object *query, if (ret < 0) return ret; find_greatest_att_bitnum(); - return mood_reload(); /* FIXME: mood_reload() returns an error */ + return reload_current_mood(); /* FIXME: mood_reload() returns an error */ } int com_addatt(__a_unused int fd, int argc, char * const * const argv) @@ -355,14 +355,14 @@ static int com_rmatt_callback(const struct osl_object *query, find_greatest_att_bitnum(); if (!atts_removed) return 1; - return mood_reload(); /* FIXME: Fix mood_reload() */ + return reload_current_mood(); } int com_rmatt(__a_unused int fd, int argc, char * const * const argv) { if (argc < 2) return -E_ATTR_SYNTAX; - return send_standard_callback_request(argc, argv, com_rmatt_callback, + return send_standard_callback_request(argc - 1, argv + 1, com_rmatt_callback, NULL); } @@ -373,7 +373,7 @@ int com_rmatt(__a_unused int fd, int argc, char * const * const argv) * \param buf Result. * * This function prints a string of at most 64 characters plus the terminating - * \p NULL character into \buf which must be provided by the caller and at + * \p NULL character into \a buf which must be provided by the caller and at * least 65 bytes long. The "x" character is used for set attributes and "-" is * used for unset attributes. * @@ -466,10 +466,9 @@ int attribute_init(struct table_info *ti, const char *db) attribute_table_desc.dir = db; ti->desc = &attribute_table_desc; - ret = osl_open_table(ti->desc, &ti->table); + ret = osl_open_table(ti->desc, &attribute_table); greatest_att_bitnum = -1; /* no atts available */ if (ret >= 0) { - attribute_table = ti->table; find_greatest_att_bitnum(); return ret; }