Index: ../ircu2.10.06/todo.jcea =================================================================== RCS file: /usr/local/cvsroot/ircu2.10.06/todo.jcea,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** ../ircu2.10.06/todo.jcea 1999/10/08 10:02:56 1.2 --- ../ircu2.10.06/todo.jcea 1999/10/08 11:42:38 1.3 *************** *** 1,9 **** 08/Oct/99 ! Imprimir NOTICES a los ircops en puntos estrategico: Borrado de la base de datos Compactacion Preguntas remotas 08/Oct/99 HECHO Recalcular HASH cuando se compacta una BDD. --- 1,12 ---- 08/Oct/99 ! Imprimir NOTICES a los ircops en puntos estrategicos: Borrado de la base de datos Compactacion Preguntas remotas + 08/Oct/99 + Ojo con el tema de las compactaciones en las bases de + datos no residentes, asi como el calculo de su HASH. 08/Oct/99 HECHO Recalcular HASH cuando se compacta una BDD. Index: ../ircu2.10.06/ircd/Makefile.in =================================================================== RCS file: /usr/local/cvsroot/ircu2.10.06/ircd/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** ../ircu2.10.06/ircd/Makefile.in 1999/10/06 21:57:25 1.2 --- ../ircu2.10.06/ircd/Makefile.in 1999/10/08 11:42:44 1.3 *************** *** 122,127 **** --- 122,128 ---- do \ ${TOUCH} ${DBPATH}/tabla.$$i ; \ done; \ + ${TOUCH} ${DBPATH}/hashes ; \ for i in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ; \ do \ ${TOUCH} ${DBPATH}/tabla.$$i ; \ Index: ../ircu2.10.06/ircd/s_debug.c =================================================================== RCS file: /usr/local/cvsroot/ircu2.10.06/ircd/s_debug.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** ../ircu2.10.06/ircd/s_debug.c 1999/10/08 09:25:18 1.12 --- ../ircu2.10.06/ircd/s_debug.c 1999/10/08 11:42:44 1.13 *************** *** 191,197 **** '-', #endif #endif ! 'D','B','2','1', #ifdef DB_ESNET '+', #else --- 191,197 ---- '-', #endif #endif ! 'D','B','2','2', #ifdef DB_ESNET '+', #else Index: ../ircu2.10.06/ircd/s_serv.c =================================================================== RCS file: /usr/local/cvsroot/ircu2.10.06/ircd/s_serv.c,v retrieving revision 1.16 retrieving revision 1.17 diff -c -r1.16 -r1.17 *** ../ircu2.10.06/ircd/s_serv.c 1999/10/08 10:02:57 1.16 --- ../ircu2.10.06/ircd/s_serv.c 1999/10/08 11:42:44 1.17 *************** *** 1547,1552 **** --- 1547,1577 ---- } /* + ** almacena_hash + ** + ** El fichero de HASHES contiene una linea + ** por BDD. Cada linea tiene el formato + ** "BDD HASH\n" + ** En total, cada linea mide 15 bytes. + */ + void almacena_hash(char que_bdd) { + char path[1024]; + char hash[20]; + int db_file; + + sprintf_irc(path,"%s/hashes",DBPATH); + inttobase64(hash,tabla_hash_hi[que_bdd],6); + inttobase64(hash+6,tabla_hash_lo[que_bdd],6); + alarm(3); + db_file=open(path,O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); + sprintf_irc(path,"%c %s\n",que_bdd,hash); + lseek(db_file,15*(que_bdd-ESNET_BDD),SEEK_SET); + write(db_file,path,strlen(path)); + close(db_file); + alarm(0); + } + + /* * db_alta * * Da de alta una entrada en la base de datos en memoria *************** *** 1560,1565 **** --- 1585,1591 ---- char *p0, *p1, *p2, *p3, *p4; actualiza_hash(registro,que_bdd); + almacena_hash(que_bdd); p0=strtok(registro," "); /* serie */ p1=strtok(NULL, " "); /* destino */ *************** *** 1585,1592 **** default: break; } - - return; } /* --- 1611,1616 ---- *************** *** 1684,1689 **** --- 1708,1715 ---- write(db_file,registro,strlen(registro)); /* CheckPoint */ close(db_file); alarm(0); + actualiza_hash(registro,que_bdd); + almacena_hash(que_bdd); } /*