+ if (!strcasecmp(data, "drop")) {
+ if (!filter_db) {
+ if (error) *error = "no database to drop";
+ return -1;
+ }
+ hs_free_database(filter_db);
+ filter_db = 0;
+ return 0;
+ }
+
+ if (!strcasecmp(data, "abort")) {
+ if (state != FILTER_FILLING) {
+ if (error) *error = "not filling";
+ return -1;
+ }
+ state = filter_db ? FILTER_LOADED : FILTER_EMPTY;
+ rb_free(filter_data);
+ filter_data = 0;
+ filter_data_len = 0;
+ return 0;
+ }
+