-
Notifications
You must be signed in to change notification settings - Fork 40
Master #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Master #30
Conversation
Code changes I needed for Android support
| #define LOGT(x,...) | ||
| #define LOG2(x,y,...) | ||
| #define LOG2F(x,y,...) | ||
| #define LOG3(x,y,z,...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missing, and failed to compile when logging was disabled.
| ${SourcesMain} ) | ||
|
|
||
|
|
||
| add_custom_target( IncludeCopy ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code section is to duplicate the header file copying in standard build. Unfortunately ninja generator in windows generated massive lines, so I added the lines in chunks which didn't cause windows to barf. Unfortunately ugly
| target_include_directories( ohNet SYSTEM PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/Temp ) | ||
| set( GENERATED_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Temp PARENT_SCOPE ) | ||
| target_include_directories( ohNet SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/ohNet/OpenHome/Net/Bindings/Android/jni ) | ||
| if( ANDROID_ENDIAN ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure the value here, as android is completely little endian - though mostly by convention, not by edict
| void NetworkAdapterList::HandleInterfaceListChanged() | ||
| { | ||
| static const char* kRemovedAdapterCookie = "RemovedAdapter"; | ||
| iListLock.Wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wait wasn't unwound, if the code to detect the network threw. That left a mutex held by a non-existant thread.
The change here is to use autoMutex, but some variables and scopes had to be moved around to get it to work.
A fix for automutex in NetworkAdapterList::HandleInterfaceListChanged
and the CMake files I needed to build ohNet for Android using windows as my OS.