Commit 438caae
committed
net_imap: Skip generate_mailbox_name for exclusive proxying sessions.
When sending untagged FETCH, EXISTS, etc. responses, we call
generate_mailbox_name to generate the name of a mailbox as it would
appear for a user (to handle shared/public mailboxes that may have
different names for different users).
If a user has a lot of exclusive proxying connections, we generate
the mailbox name for that user each loop iteration, but then when
we call imap_notify_applicable, the answer will be "no" because
exclusively proxying sessions don't create NOTIFY watches locally.
As an optimization, we can therefore simply skip that session entirely
if it's exclusively proxying.
Also indicate in the "imap sessions" CLI command if a session is
exclusively proxying. Previously the output reported "No" since
imap->client is not set, but this is incorrect. We now use the dedicated
flag to distinguish between exclusively proxying sessions and normal
sessions that just happen to have a proxying client in the foreground.
LBBS-140 #close1 parent 6cb9fa0 commit 438caae
3 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
505 | 508 | | |
506 | 509 | | |
507 | 510 | | |
| |||
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
562 | 568 | | |
563 | 569 | | |
564 | 570 | | |
| |||
637 | 643 | | |
638 | 644 | | |
639 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
640 | 650 | | |
641 | 651 | | |
642 | 652 | | |
| |||
715 | 725 | | |
716 | 726 | | |
717 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
718 | 731 | | |
719 | 732 | | |
720 | 733 | | |
| |||
767 | 780 | | |
768 | 781 | | |
769 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
770 | 786 | | |
771 | 787 | | |
772 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| 1243 | + | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
| |||
1312 | 1313 | | |
1313 | 1314 | | |
1314 | 1315 | | |
| 1316 | + | |
1315 | 1317 | | |
1316 | 1318 | | |
1317 | 1319 | | |
| |||
0 commit comments