Skip to content

Commit

Permalink
Remove improved_mboxlist_sort leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov committed Aug 6, 2023
1 parent ed02770 commit 84c0b16
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 93 deletions.
2 changes: 0 additions & 2 deletions cassandane/Cassandane/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ sub default
delete_mode => 'delayed',
# for debugging - see cassandane.ini.example
debug_command => '@prefix@/utils/gdbtramp %s %d',
# everyone should be running this
improved_mboxlist_sort => 'yes',
# default changed, we want to be explicit about it
unixhierarchysep => 'no',
# let's hear all about it
Expand Down
1 change: 0 additions & 1 deletion cassandane/Cassandane/Cyrus/Prometheus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ sub test_quota_commitments_no_improved_mboxlist_sort
{
my ($self) = @_;

$self->{instance}->{config}->set('improved_mboxlist_sort', 'no');
$self->_start_instances();

my $admintalk = $self->{adminstore}->get_client();
Expand Down
1 change: 0 additions & 1 deletion cassandane/Cassandane/Cyrus/Quota.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,6 @@ sub test_quota_f_no_improved_mboxlist_sort
'[email protected]',
);

$self->{instance}->{config}->set('improved_mboxlist_sort', 'no');
$self->_start_instances();

my $admintalk = $self->{adminstore}->get_client();
Expand Down
3 changes: 1 addition & 2 deletions cunit/quota.testc
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,7 @@ static void notest_foreach(void)
#endif

/*
* TODO: should test for quota_foreach() iteration order,
* with and without IMAPOPT_IMPROVED_MBOXLIST_SORT set.
* TODO: should test for quota_foreach() iteration order.
* There is code that depends on it, e.g. for quota -f.
*/

Expand Down
34 changes: 0 additions & 34 deletions doc/internal/improved_mboxlist_sort.html

This file was deleted.

34 changes: 0 additions & 34 deletions docsrc/imap/developer/thoughts/improved_mboxlist_sort.rst

This file was deleted.

6 changes: 2 additions & 4 deletions docsrc/imap/download/release-notes/3.6/x/3.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ change during the process.
* The `reverseuniqueids` :cyrusman:`imapd.conf(5)` option is now deprecated
and unused. Reverse UNIQUEID records are now standard and cannot be turned
off.
* The `improved_mboxlist_sort` :cyrusman:`imapd.conf(5)` option does nothing.

Security fixes
==============
Expand All @@ -150,10 +151,7 @@ Significant bugfixes
XML element instead of text (thanks Дилян Палаузов)
* Fixed :issue:`3896`: the `-d` (dump) and `-u` (undump) options to
:cyrusman:`ctl_mboxlist(8)` now correctly dump and undump all fields in
mailboxes.db entries. The intermediary file format is now JSON. This change
makes it possible to follow the procedure
for switching `improved_mboxlist_sort` described in
:ref:`enabling improved mboxlist sort`
mailboxes.db entries. The intermediary file format is now JSON.
* Fixed :issue:`4035`: `ctl_cyrusdb -r` now recovers from mailboxes.db
records with missing uniqueids, instead of crashing. A new `-P` option to
:cyrusman:`reconstruct(8)` enables repairing mailboxes whose header files
Expand Down
5 changes: 1 addition & 4 deletions imap/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ static int fixquota_dopass(char *domain, char **roots, int nroots,
mboxlist_cb *pass, int isuser);
static int fixquota_fixroot(struct mailbox *mailbox, const char *root);
static int fixquota_finish(int thisquota);
static int (*compar)(const char *s1, const char *s2);

#define QUOTAGROW 300

Expand Down Expand Up @@ -201,8 +200,6 @@ int main(int argc,char **argv)
fatal(error_message(r), EX_CONFIG);
}

compar = strcmp;

/*
* Lock mailbox list to prevent mailbox creation/deletion
* during work
Expand Down Expand Up @@ -450,7 +447,7 @@ static int findroot(const char *name, int *thisquota)

/* have we already passed the name, then there can
* be no further matches */
if (compar(root, name) > 0)
if (strcmp(root, name) > 0)
break;

/* is the mailbox within this root? */
Expand Down
3 changes: 1 addition & 2 deletions imap/quota_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ EXPORTED void quotadb_open(const char *fname)
{
int ret;
char *tofree = NULL;
int flags = CYRUSDB_CREATE;

if (!fname)
fname = config_getstring(IMAPOPT_QUOTA_DB_PATH);
Expand All @@ -722,7 +721,7 @@ EXPORTED void quotadb_open(const char *fname)
fname = tofree;
}

ret = cyrusdb_open(QDB, fname, flags, &qdb);
ret = cyrusdb_open(QDB, fname, CYRUSDB_CREATE, &qdb);
if (ret != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(ret));
Expand Down
10 changes: 1 addition & 9 deletions lib/imapoptions
Original file line number Diff line number Diff line change
Expand Up @@ -1206,15 +1206,7 @@ Blank lines and lines beginning with ``#'' are ignored.
is prepended. */

{ "improved_mboxlist_sort", 0, SWITCH, "2.3.17" }
/* If enabled, a special comparator will be used which will correctly
sort mailbox names that contain characters such as ' ' and '-'.
.PP
Note that this option SHOULD NOT be changed on a live system. The
mailboxes database should be dumped (ctl_mboxlist) before the
option is changed, removed, and then undumped after changing the
option. When not using flat files for the subscriptions databases
the same has to be done (cyr_dbtool) for each subscription database
See improved_mboxlist_sort.html.*/
/* Not used anymore. */

{ "jmap_emailsearch_db_path", NULL, STRING, "3.1.6", "3.6.0" }
/* The absolute path to the JMAP email search cache file. If not
Expand Down

0 comments on commit 84c0b16

Please sign in to comment.