Problems with SIM

Hi everyone!! ,im doing the libreries to my project and something really strange happened. Im trynig to suscribe my SIM using a library function called “exe_SIMInit (ascii Pin_number)”, strangely when i use this function the following events appear

09/10/28,12:18:33:437 ADL 1 ADL_SIM_STATE_INSERTED
09/10/28,12:18:42:937 ADL 1 Inside Sim_Handler
09/10/28,12:18:42:937 ADL 1 ADL_SIM_STATE_REMOVED
09/10/28,12:18:43:484 ADL 1 Inside Sim_Handler
09/10/28,12:18:43:484 ADL 1 ADL_SIM_STATE_PIN_ERROR

Now, the PinNumber is “0” and that number is OK.
The strangest thing is that if i just use the adl_simSuscbibe funtion in the main.c with the same pin number…it works fine!!, the ADL_SIM_STATE_FULL_INIT appears!!..i really dont know what im doing wrong. I really would need some helo with this.

This is the code…of the main.c and wav_GSM.c


void hardware_init(void)
ascii *PIN;
TRACE((1,"[main.c][hardware_init]:Hardware Inicializacion correcta"));

bool exe_SIMInit(ascii *pin)
u32 SIM_handler;
	TRACE((1,"[wav_GSM.c][exe_SIMInit]:adl_simSubscribe OK"));
	return TRUE;
	TRACE((1,"[wav_GSM.c][exe_SIMInit]:adl_simSubscribe ERROR"));
	return FALSE;
return FALSE;


I solved!, the problems were some defines whose values were just wrong.