0.8.6claws75
[claws.git] / src / pop.c
index 488965b2042b8258106e4c44dcd88cd83e5af7a2..8738bb438e6e2984310e5d33148bb4f67dc2d7da 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -39,7 +39,8 @@
 #include "inc.h"
 #include "recv.h"
 #include "selective_download.h"
-#if USE_SSL
+#include "log.h"
+#if USE_OPENSSL
 #  include "ssl.h"
 #endif
 
@@ -98,7 +99,7 @@ gint pop3_greeting_recv(SockInfo *sock, gpointer data)
 
        if ((ok = pop3_ok(sock, buf)) == PS_SUCCESS) {
                state->greeting = g_strdup(buf);
-#if USE_SSL
+#if USE_OPENSSL
                if (state->ac_prefs->ssl_pop == SSL_STARTTLS)
                        return POP3_STLS_SEND;
 #endif
@@ -112,7 +113,7 @@ gint pop3_greeting_recv(SockInfo *sock, gpointer data)
        }
 }
 
-#if USE_SSL
+#if USE_OPENSSL
 gint pop3_stls_send(SockInfo *sock, gpointer data)
 {
        pop3_gen_send(sock, "STLS");
@@ -143,7 +144,7 @@ gint pop3_stls_recv(SockInfo *sock, gpointer data)
                return -1;
        }
 }
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
 
 gint pop3_getauth_user_send(SockInfo *sock, gpointer data)
 {
@@ -475,9 +476,14 @@ gint pop3_top_recv(SockInfo *sock, gpointer data)
                                   
        if ( (write_val = recv_write_to_file(sock, filename)) < 0) {
                state->error_val = (write_val == -1 ? PS_IOERR : PS_SOCKET);
+               g_free(path);
+               g_free(filename);
                return -1;
        }
-
+       
+       g_free(path);
+       g_free(filename);
+       
        pop3_sd_state(state, POP3_TOP_RECV, &next_state);
        
        if (state->cur_msg < state->count) {
@@ -691,6 +697,7 @@ static void pop3_sd_new_header(Pop3State *state)
                
                state->ac_prefs->msg_list = g_slist_append(state->ac_prefs->msg_list, 
                                                           new_msg);
+               debug_print("received ?: msg %i, received: %i\n",new_msg->index, new_msg->received); 
        }
 }