fixed an import related sql logging bug

This commit is contained in:
SJ 2015-07-30 13:23:43 +02:00
parent c95e1b23e7
commit 58f6efb7ec
3 changed files with 8 additions and 11 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "1.2.0-master"
#define BUILD 915
#define BUILD 916
#define HOSTID "mailarchiver"

View File

@ -234,14 +234,15 @@ int process_imap_folder(int sd, int *seq, char *folder, struct session_data *sda
close(fd);
if(dryrun == 0 && msglen > 10) rc = import_message(filename, sdata, data, cfg);
else rc = OK;
if(dryrun == 0 && msglen > 10){
rc = import_message(filename, sdata, data, cfg);
if(data->import->processed_messages % 100 == 0){
time(&(data->import->updated));
update_import_job_stat(sdata, data);
}
}
else rc = OK;
if(rc == ERR) printf("error importing '%s'\n", filename);

View File

@ -48,8 +48,6 @@ void p_bind_init(struct __data *data){
void p_query(struct session_data *sdata, char *s, struct __config *cfg){
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: p_query=%s", sdata->ttmpfile, s);
mysql_real_query(&(sdata->mysql), s, strlen(s));
}
@ -212,8 +210,6 @@ int p_get_affected_rows(MYSQL_STMT *stmt){
int prepare_sql_statement(struct session_data *sdata, MYSQL_STMT **stmt, char *s, struct __config *cfg){
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: prepare statement=%s", sdata->ttmpfile, s);
*stmt = mysql_stmt_init(&(sdata->mysql));
if(!*stmt){
syslog(LOG_PRIORITY, "%s: mysql_stmt_init() error", sdata->ttmpfile);