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.
This was missing, and failed to compile when logging was disabled.
| ${SourcesMain} ) | ||
|
|
||
|
|
||
| add_custom_target( IncludeCopy ) |
There was a problem hiding this comment.
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.
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.
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.