[Refdb-cvs] CVS: refdb/src risxhandler.c,1.28.2.10,1.28.2.11
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2005-08-12 21:14:38
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7367 Modified Files: Tag: Release_0_9_5_stable risxhandler.c Log Message: clean up xuser entries when updating a risx reference Index: risxhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v retrieving revision 1.28.2.10 retrieving revision 1.28.2.11 diff -u -U2 -r1.28.2.10 -r1.28.2.11 --- risxhandler.c 29 Jul 2005 21:15:43 -0000 1.28.2.10 +++ risxhandler.c 12 Aug 2005 21:14:30 -0000 1.28.2.11 @@ -334,4 +334,27 @@ /* else: all fine */ + /* search orphans in t_xuser */ + result = remove_xuser_entries(ptr_ardata->n_refdb_id, ptr_ardata->username, ptr_ardata->conn); + if (result != 0 && result != 4) { + if (result == 1) { + strcpy(sql_command, "select from t_xuser failed\n"); + } + else if (result == 3) { + strcpy(sql_command, "delete from t_xuser failed\n"); + } + + (ptr_ardata->ndb_error)++; + + if ((new_msgpool = mstrcat(ptr_ardata->msgpool, sql_command, &(ptr_ardata->msgpool_len), 0)) == NULL) { + (ptr_ardata->nmem_error)++; + return; + } + else { + ptr_ardata->msgpool = new_msgpool; + } + return; + } + /* else: all fine */ + /* search orphans in t_periodical */ sprintf(sql_command, "SELECT refdb_periodical_id FROM t_refdb WHERE refdb_id="ULLSPEC, (unsigned long long)(ptr_ardata->n_refdb_id)); |