Skip to content

Commit

Permalink
Correción al eliminar de conjunto
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfv committed Jun 25, 2016
1 parent 23f01f7 commit 5fd408d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions configuracion.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef CONFIGURACIONES
#define CONFIGURACIONES

#define NUM_INTENTOS 3 //Número máximo de intentos si el server no responde
#define LON_MAX_MENSAJE 100 //Longitud máxima del buffer de mensajes FIXME Hay que cambiarlo
#define NUM_MAX_PUESTOS 200 //Capacidad del estacionamiento FIXME esto está dado
#define TIEMPO_MAX_USEG 100000 //Tiempo de espera de servidor máximo en miles de milisegundos
#define TIEMPO_MAX_SEG 0 //Tiempo de espera de servidor máximo en segundos (Se suma con el anterior)
#define NUM_MAX_PUESTOS 200 //Capacidad del estacionamiento
#define TIEMPO_MAX_USEG 0 //Tiempo de espera de servidor máximo en miles de milisegundos
#define TIEMPO_MAX_SEG 1 //Tiempo de espera de servidor máximo en segundos (Se suma con el anterior)
#define MAX_PUERTO 65535 // número máximo de puertos

#endif
2 changes: 1 addition & 1 deletion conjunto_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool insertarEnConj(conjunto * c, uint32_t identificador, time_t tiempo) {
*/
bool eliminarEnConj(conjunto *c, uint32_t identificador, time_t *tiempoEstacionado){
int hash = identificador % TAM_HASH;
int n;
int n = 0;

while (n < TAM_HASH) {
if (c->elems[hash].estado == OCUPADO) {
Expand Down

0 comments on commit 5fd408d

Please sign in to comment.