From: Sebastian B. <sb...@us...> - 2013-12-24 09:30:51
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1004 Modified Files: imap.c Log Message: Added some logging. Index: imap.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/imap.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- imap.c 24 Dec 2013 09:17:39 -0000 1.81 +++ imap.c 24 Dec 2013 09:30:49 -0000 1.82 @@ -112,6 +112,8 @@ void *handle = NULL; int i,success = 0; + SM_ENTER; + folder_lock(folder); folder_next_mail(folder,&handle); @@ -145,6 +147,7 @@ *num_of_todel_mails_ptr = num_of_todel_mails; } folder_unlock(folder); + SM_RETURN(success,"%d"); return success; } @@ -560,9 +563,14 @@ int success = 0; struct remote_mail *remote_mail_array = NULL; + SM_ENTER; + struct remote_mailbox *rm; if (!(rm = imap_select_mailbox(conn,path,writemode))) + { + SM_RETURN(NULL,"%p"); return NULL; + } if (!uid_start) uid_end = 0; else if (!uid_end) uid_start = 0; @@ -701,6 +709,7 @@ rm->remote_mail_array = remote_mail_array; rm->num_of_remote_mail = num_of_remote_mails; } + SM_RETURN(rm, "%p"); return rm; } @@ -1575,10 +1584,20 @@ struct progmon *pm; - if (!imap_connection) return -1; + SM_ENTER; + + if (!imap_connection) + { + SM_RETURN(-1,"%d"); + return -1; + } getcwd(path, sizeof(path)); - if (chdir(imap_local_path) == -1) return -1; + if (chdir(imap_local_path) == -1) + { + SM_RETURN(-1,"%d"); + return -1; + } SM_DEBUGF(10,("Downloading mails of folder \"%s\"\n",imap_folder)); @@ -1799,7 +1818,7 @@ thread_call_parent_function_async_string(status_set_status,1,path); } - + SM_RETURN(downloaded_mails,"%d"); return downloaded_mails; } |