Skip to content

Conversation

@SStorm
Copy link
Contributor

@SStorm SStorm commented Jan 18, 2018

Some restructuring of the code to make it easier to override some of the definitions (especially statically allocated sizes for strings etc.).

This is achieved by optionally specifying a STUNLIB_CUSTOM_CONFIG preprocessor flag, i.e. -D STUNLIB_CUSTOM_CONFIG="\"my_config.h\"" which gets included instead of the default one. Would like to hear your thoughts on this approach. A potential alternative might be something like:

#ifdef STUNLIB_CUSTOM_CONFIG
#include "stunlib_config_custom.h"
#else
#include "stunlib_config.h"
#endif

Also, changed u_int16_t to uint16_t for better compatibility, hope you don't mind.

On a positive note, this now happily runs on a esp32 SoC with 400kb of memory ;-)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 82.594% when pulling 4146c3e on imont:config_customisation into 36cc9dd on NATTools:master.

@palerikm palerikm merged commit 4fb2b04 into NATTools:master Jan 22, 2018
@SStorm SStorm deleted the config_customisation branch January 23, 2018 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants