diff --git a/configuracion.h b/configuracion.h index 3faaec1..d17a02d 100644 --- a/configuracion.h +++ b/configuracion.h @@ -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 diff --git a/conjunto_hash.c b/conjunto_hash.c index 872e755..a65857c 100644 --- a/conjunto_hash.c +++ b/conjunto_hash.c @@ -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) {