projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
oops
[apps/madmutt.git]
/
pop
/
pop.c
diff --git
a/pop/pop.c
b/pop/pop.c
index
89e4dd8
..
bba466f
100644
(file)
--- a/
pop/pop.c
+++ b/
pop/pop.c
@@
-12,6
+12,7
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/file.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
@@
-259,7
+260,7
@@
int pop_open_mailbox (CONTEXT * ctx)
conn->data = pop_data;
conn->data = pop_data;
-
FOREVER
{
+
for (;;)
{
if (pop_reconnect (ctx) != PQ_OK)
return -1;
if (pop_reconnect (ctx) != PQ_OK)
return -1;
@@
-354,7
+355,7
@@
int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno)
}
}
}
}
-
FOREVER
{
+
for (;;)
{
if (pop_reconnect (ctx) != PQ_OK)
return -1;
if (pop_reconnect (ctx) != PQ_OK)
return -1;
@@
-440,7
+441,7
@@
pop_query_status pop_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint)
pop_data->check_time = 0;
pop_data->check_time = 0;
-
FOREVER
{
+
for (;;)
{
if (pop_reconnect (ctx) != PQ_OK)
return PQ_NOT_CONNECTED;
if (pop_reconnect (ctx) != PQ_OK)
return PQ_NOT_CONNECTED;
@@
-454,7
+455,7
@@
pop_query_status pop_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint)
}
if (ret == PQ_OK) {
}
if (ret == PQ_OK) {
-
strfcpy (buf, "QUIT\r\n", sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), "QUIT\r\n"
);
ret = pop_query (pop_data, buf, sizeof (buf));
}
ret = pop_query (pop_data, buf, sizeof (buf));
}
@@
-557,7
+558,7
@@
void pop_fetch_mail (void)
mutt_message _("Checking for new messages...");
/* find out how many messages are in the mailbox. */
mutt_message _("Checking for new messages...");
/* find out how many messages are in the mailbox. */
-
strfcpy (buffer, "STAT\r\n", sizeof (buffer)
);
+
m_strcpy(buffer, sizeof(buffer), "STAT\r\n"
);
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
@@
-570,7
+571,7
@@
void pop_fetch_mail (void)
/* only get unread messages */
if (msgs > 0 && option (OPTPOPLAST)) {
/* only get unread messages */
if (msgs > 0 && option (OPTPOPLAST)) {
-
strfcpy (buffer, "LAST\r\n", sizeof (buffer)
);
+
m_strcpy(buffer, sizeof(buffer), "LAST\r\n"
);
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
@@
-639,14
+640,14
@@
void pop_fetch_mail (void)
if (rset) {
/* make sure no messages get deleted */
if (rset) {
/* make sure no messages get deleted */
-
strfcpy (buffer, "RSET\r\n", sizeof (buffer)
);
+
m_strcpy(buffer, sizeof(buffer), "RSET\r\n"
);
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
}
finish:
/* exit gracefully */
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
}
finish:
/* exit gracefully */
-
strfcpy (buffer, "QUIT\r\n", sizeof (buffer)
);
+
m_strcpy(buffer, sizeof(buffer), "QUIT\r\n"
);
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
mutt_socket_close (conn);
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
mutt_socket_close (conn);