add debugging info with -DPRINT_LOTS_OF_DEBUG

SVN revision: 52547
master
Mike Blumenkrantz 12 years ago
parent bc9de86ed4
commit a2293fc949
  1. 20
      src/imap.c
  2. 15
      src/imap2.c

@ -2,6 +2,14 @@
#include "e_mod_main.h"
#include "imap.h"
#ifdef PRINT_LOTS_OF_DEBUG
static void
tls_log_func(int level, const char *str)
{
fprintf(stderr, "|<%d>| %s", level, str);
}
#endif
static ImapServer *_mail_imap_server_find (Ecore_Con_Server *server);
static ImapServer *_mail_imap_server_get (Config_Box *cb);
static ImapClient *_mail_imap_client_get (Config_Box *cb);
@ -45,7 +53,17 @@ _mail_imap_check_mail (void *data)
type = ECORE_CON_REMOTE_SYSTEM;
if (ecore_con_ssl_available_get () && (is->ssl))
type |= ECORE_CON_USE_SSL;
{
type |= ECORE_CON_USE_SSL;
#ifdef PRINT_LOTS_OF_DEBUG
if (ecore_con_ssl_available_get() == 1)
{
gnutls_global_set_log_level(9);
gnutls_global_set_log_function(tls_log_func);
}
}
#endif
}
is->state = IMAP_STATE_DISCONNECTED;
is->server =
ecore_con_server_connect (type, is->host,

@ -8,6 +8,14 @@
#define D(args...)
#endif
#ifdef PRINT_LOTS_OF_DEBUG
static void
tls_log_func(int level, const char *str)
{
fprintf(stderr, "|<%d>| %s", level, str);
}
#endif
/*
* TODO:
* * Let the user select between Unseen, Recent and New mail
@ -55,6 +63,13 @@ _mail_imap_check_mail (void *data)
if (ecore_con_ssl_available_get () && (ic->config->ssl))
{
#ifdef PRINT_LOTS_OF_DEBUG
if (ecore_con_ssl_available_get() == 1)
{
gnutls_global_set_log_level(9);
gnutls_global_set_log_function(tls_log_func);
}
#endif
D ("Use SSL for %s:%s\n", ic->config->host, ic->config->new_path);
switch (ic->config->ssl)
{

Loading…
Cancel
Save