dl9sec / ArduinoSIP

Arduino SIP library with UDP communications
BSD 3-Clause "New" or "Revised" License
41 stars 19 forks source link

DEBUGLOG Flag not working correctly? #3

Open smc8050 opened 3 years ago

smc8050 commented 3 years ago

Hi,

Thanks for the cool library it works flawlessly with the Fritzbox and a LOLIN D1 Mini Pro. However the debug functionality by uncommenting the //#define DEBUGLOG does not work. I have found out, that if the line #define DEBUGLOG is paced in the ArduinoSIP.h the SIP debug logs are printed. I think the problem is that the flag defined in the .ino is not in the scope of the header file and thus it will not print the debug output. Is there a better than changing the ArduinoSIP.h to get the debug logs?

Thank you :)

dl9sec commented 3 years ago

Thank you very much, well spotted :-)

I think if the #define DEBUGLOG is placed before including ArduinoSIP.h in the examples it will work. Maybe it would be best to put the line before the first include.

Maybe you could try this and give me a feedback. Then I will change it in the sources...

Thank you.

Regards, Thorsten

smc8050 commented 3 years ago

Hi Thorsten, Thats what I also tried but it does still not print the debug. I will see if I find some way and will keep you posted if something crosses my mind. Cheers