diff --git a/nets/net_imap.c b/nets/net_imap.c index 1ff4ae7..6ecb684 100644 --- a/nets/net_imap.c +++ b/nets/net_imap.c @@ -1219,7 +1219,7 @@ static void low_quota_alert(struct imap_session *imap) { unsigned long quotaleft = mailbox_quota_remaining(imap->mbox); if (quotaleft < LOW_MAILBOX_SPACE_THRESHOLD) { /* Very little quota remaining */ - imap_send(imap, "OK [ALERT] Mailbox is almost full (%lu KB quota remaining)\n", quotaleft / 1024); + imap_send(imap, "OK [ALERT] Mailbox is almost full (%lu KB quota remaining)", quotaleft / 1024); } } @@ -4578,6 +4578,7 @@ static int imap_process(struct imap_session *imap, char *s) /* Hold the mailbox lock for a moment. */ /*! \note This is only used for the test suite, it is not part of any IMAP standard or intended for clients. */ MAILBOX_TRYRDLOCK(imap); + imap_send(imap, "TESTLOCK in progress"); usleep(4000000); /* 500ms is sufficient normally, but under valgrind, we need more time. Even 2500ms is not enough. */ mailbox_unlock(imap->mbox); imap_reply(imap, "OK Lock test succeeded"); diff --git a/tests/test_imap_pop3_compat.c b/tests/test_imap_pop3_compat.c index 7565357..c3a3adc 100644 --- a/tests/test_imap_pop3_compat.c +++ b/tests/test_imap_pop3_compat.c @@ -72,9 +72,9 @@ static int run(void) /* Interleave these writes at the same time to ensure the lock is held when the POP server tries to authenticate */ SWRITE(client1, "a2 TESTLOCK" ENDL); /* When the INBOX is selected, that should temporarily grab the lock */ + CLIENT_EXPECT(client1, "TESTLOCK in progress"); /* Wait for TESTLOCK command to start processing, so we know the lock's held */ SWRITE(client2, "PASS " TEST_PASS ENDL); - CLIENT_EXPECT(client2, "-ERR [IN-USE]"); /* Mailbox is busy */ close_if(client2); /* POP server will disconnect at this point. We'll need to reconnect. */