2005-11-07 [cleroy] 1.9.99cvs16
[claws.git] / src / send_message.c
index 3402edbdd507437d730b99d9c02474877b411b6f..34aa6b991a711ff6521487e1959726dfd3cd0c04 100644 (file)
@@ -96,15 +96,18 @@ gint send_message(const gchar *file, PrefsAccount *ac_prefs, GSList *to_list)
                return -1;
        }
 
+       inc_lock();
        if (ac_prefs->use_mail_command && ac_prefs->mail_command &&
            (*ac_prefs->mail_command)) {
                val = send_message_local(ac_prefs->mail_command, fp);
                fclose(fp);
+               inc_unlock();
                return val;
        } else {
                val = send_message_smtp(ac_prefs, to_list, fp);
                
                fclose(fp);
+               inc_unlock();
                return val;
        }
 }