[Refdb-cvs] CVS: refdb/src noteshandler.c,1.14,1.15
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2004-02-10 23:53:31
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29453 Modified Files: noteshandler.c Log Message: added nongeek_offset, fixed return message Index: noteshandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/noteshandler.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -U2 -r1.14 -r1.15 --- noteshandler.c 29 Jan 2004 01:35:27 -0000 1.14 +++ noteshandler.c 10 Feb 2004 23:49:49 -0000 1.15 @@ -42,4 +42,5 @@ extern int n_log_level; +extern int nongeek_offset; extern struct BSTRING connerr; extern struct BSTRING outomem; @@ -988,5 +989,16 @@ else { my_dbi_conn_unlock(ptr_andata->conn); - sprintf(sql_command, "Adding set "ULLSPEC" successful\n", (unsigned long long)(ptr_andata->set_count)); + + if (ptr_andata->create_new) { + sprintf(sql_command, "Adding input set "ULLSPEC" successful\n", (unsigned long long)(ptr_andata->set_count + nongeek_offset)); + (ptr_andata->added_count)++; + } + else { + sprintf(sql_command, "Updating input set "ULLSPEC" successful\n", (unsigned long long)(ptr_andata->set_count + nongeek_offset)); + (ptr_andata->updated_count)++; + } + + (ptr_andata->set_count)++; + if ((new_msgpool = mstrcat(ptr_andata->msgpool, sql_command, &(ptr_andata->msgpool_len), 0)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -997,12 +1009,4 @@ ptr_andata->msgpool = new_msgpool; } - /* ToDo: see whether updated or added */ - if (ptr_andata->create_new) { - (ptr_andata->added_count)++; - } - else { - (ptr_andata->updated_count)++; - } - (ptr_andata->set_count)++; } } |