mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:20:12 +01:00
fixed an import related sql logging bug
This commit is contained in:
parent
c95e1b23e7
commit
58f6efb7ec
@ -14,7 +14,7 @@
|
||||
|
||||
#define VERSION "1.2.0-master"
|
||||
|
||||
#define BUILD 915
|
||||
#define BUILD 916
|
||||
|
||||
#define HOSTID "mailarchiver"
|
||||
|
||||
|
13
src/imap.c
13
src/imap.c
@ -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);
|
||||
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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user