[Refdb-cvs] CVS: refdb/src risxhandler.c,1.24,1.25
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2004-02-07 14:55:41
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2553 Modified Files: risxhandler.c Log Message: added support to count datasets from 0 or 1 Index: risxhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -U2 -r1.24 -r1.25 --- risxhandler.c 25 Jan 2004 19:31:56 -0000 1.24 +++ risxhandler.c 7 Feb 2004 14:52:47 -0000 1.25 @@ -50,4 +50,5 @@ extern int n_log_level; +extern int nongeek_offset; extern struct BSTRING connerr; extern struct BSTRING outomem; @@ -1712,5 +1713,12 @@ else { my_dbi_conn_unlock(ptr_ardata->conn); - sprintf(sql_command, "Adding set "ULLSPEC" successful\n", (unsigned long long)(ptr_ardata->set_count)); + if (ptr_ardata->create_new) { + sprintf(sql_command, "Adding input set "ULLSPEC" successful\n", (unsigned long long)(ptr_ardata->set_count + nongeek_offset)); + (ptr_ardata->added_count)++; + } + else { + sprintf(sql_command, "Updating input set "ULLSPEC" successful\n", (unsigned long long)(ptr_ardata->set_count + nongeek_offset)); + (ptr_ardata->updated_count)++; + } if ((new_msgpool = mstrcat(ptr_ardata->msgpool, sql_command, &(ptr_ardata->msgpool_len), 0)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1721,11 +1729,5 @@ ptr_ardata->msgpool = new_msgpool; } - /* ToDo: see whether updated or added */ - if (ptr_ardata->create_new) { - (ptr_ardata->added_count)++; - } - else { - (ptr_ardata->updated_count)++; - } + (ptr_ardata->set_count)++; } |