diff options
author | Jasper Huijsmans <jbhuijsmans@home.nl> | 2004-11-11 09:21:24 +0000 |
---|---|---|
committer | Jasper Huijsmans <jbhuijsmans@home.nl> | 2004-11-11 09:21:24 +0000 |
commit | 303bc59767e73d08385889fe594c18cf8b3e783b (patch) | |
tree | a8e91bc73b5822cb656f6d0548d4de8064c40a08 /plugins | |
parent | ad46dd7068d7d82a97a44478c8d339cbff390e50 (diff) |
Patch by Piotr Chmura <chmooreck@poczta.onet.pl> to fix pop3 mail checking
(Old svn revision: 4214)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mailcheck/mailcheck.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/plugins/mailcheck/mailcheck.c b/plugins/mailcheck/mailcheck.c index ea497dc9..167ffc51 100644 --- a/plugins/mailcheck/mailcheck.c +++ b/plugins/mailcheck/mailcheck.c @@ -477,6 +477,19 @@ run_mailcheck (t_mailcheck * mc) } } +/* set mailbox type */ +static void +set_mbox_type(t_mailcheck *mc) +{ + if (strncmp (mc->mbox, "pop3://", 7 * sizeof (char)) == 0) + { + mc->pop3 = TRUE; + sscanf (mc->mbox, "pop3://%[^:]:%[^@]@%s", + mc->pop3_username, + mc->pop3_password, mc->pop3_hostname); + } +} + static void mailcheck_read_config (Control * control, xmlNodePtr node) { @@ -514,14 +527,8 @@ mailcheck_read_config (Control * control, xmlNodePtr node) { g_free (mc->mbox); mc->mbox = (char *) value; - - if (strncmp (mc->mbox, "pop3://", 7 * sizeof (char)) == 0) - { - mc->pop3 = TRUE; - sscanf (mc->mbox, "pop3://%[^:]:%[^@]@%s", - mc->pop3_username, - mc->pop3_password, mc->pop3_hostname); - } + + set_mbox_type(mc); } } else if (xmlStrEqual @@ -749,6 +756,7 @@ mailcheck_apply_options (MailDialog * md) { g_free (mc->mbox); mc->mbox = g_strdup (tmp); + set_mbox_type(mc); } tmp = gtk_entry_get_text (GTK_ENTRY (md->newmail_cmd_entry)); |