<table><tr><td style="">gkowal updated this revision to Diff 39370.<br />gkowal edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-px3qyg2hxj5jtfz/">(Show Details)</a><br />gkowal added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14629">View Revision</a></tr></table><br /><div><div><p>Patch updated including two autotests.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">According to IMAP4 QUOTA extension (RFC2087) each mailbox may have zero or more quota roots, and each quota root may have zero or more resource limits (quotas). It means that depending on implementation <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">GET</span>QUOTAROOT command may return some roots with no corresponding QUOTA responses. Such roots simply have no limitations of resource. Moreover, the RFC explains that quota root names do not have to match the names of <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the </span>existing mailboxes.<br />
<br />
This commit tries to make the IMAP Quota roots retrieval more conformant with RFC2087. It processes all quota roots returned by <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">GET </span>QUOTAROOT command and filters out roots with no corresponding QUOTA responses. As previously, it sets<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> </span> newCurrent and newMax variables from the root which matches the mailbox name, however, it uses the first existing QUOTA response for a given mailbox otherwise.<br />
<br />
This change guarantees that lists newRoots, newLimits, and newUsage always have the same number of elements and that newCurrent and newMax values are retrieved even for mailboxes with multiple roots.<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
<br />
In addition two autotests are added. First one checks if roots with no corresponding resource limits are filtered out correctly. Second one checks if the current and maximum values of quota are set correctly, if among multiple roots, with resources or with no resource, one matches the mailbox name.</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R44 KDE PIM Runtime</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D14629?vs=39169&id=39370">https://phabricator.kde.org/D14629?vs=39169&id=39370</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14629">https://phabricator.kde.org/D14629</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>resources/imap/autotests/testretrievecollectionmetadatatask.cpp<br />
resources/imap/retrievecollectionmetadatatask.cpp</div></div></div><br /><div><strong>To: </strong>gkowal, KDE PIM, mlaurent<br /><strong>Cc: </strong>mlaurent, dvratil, kde-pim, dvasin, rodsevich, winterz, vkrause, knauss<br /></div>