diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 1bb4e27d1..e249cd0db 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -61,16 +61,3 @@ if(BUILD_TESTING) add_subdirectory(test) endif() -if(IOS AND MONOLITHIC_BUILD AND (NOT BUILD_SHARED_LIBS)) -# generate combined library - foreach(af ${${MODULE_PREFIX}_LIBS}) - get_target_property(LOC ${af} LOCATION) - if ((NOT (${LOC} MATCHES ".*libfreerdp.a$")) AND (NOT (${LOC} MATCHES ".*libwinpr.a$"))) - set(ALIST ${ALIST} ${LOC}) - endif() - endforeach() - get_target_property(LOC ${MODULE_NAME} LOCATION) - set(ALIST ${ALIST} ${LOC}) - message(${ALIST}) - add_custom_command(TARGET ${MODULE_NAME} POST_BUILD COMMAND libtool -static -o libfreerdp-client-combined.a ${ALIST}) -endif() diff --git a/client/iOS/Controllers/BookmarkEditorController.m b/client/iOS/Controllers/BookmarkEditorController.m index de80c50d3..dc5714da6 100644 --- a/client/iOS/Controllers/BookmarkEditorController.m +++ b/client/iOS/Controllers/BookmarkEditorController.m @@ -32,8 +32,11 @@ if ((self = [super initWithStyle:UITableViewStyleGrouped])) { // set additional settings state according to bookmark data - _bookmark = [bookmark retain]; - _params = [bookmark params]; + if ([[bookmark uuid] length] == 0) + _bookmark = [bookmark copy]; + else + _bookmark = [bookmark copyWithUUID]; + _params = [_bookmark params]; // if this is a TSX Connect bookmark - disable server settings if([_bookmark isKindOfClass:NSClassFromString(@"TSXConnectComputerBookmark")]) diff --git a/client/iOS/Controllers/BookmarkListController.m b/client/iOS/Controllers/BookmarkListController.m index b3f43c732..a6ff0685a 100644 --- a/client/iOS/Controllers/BookmarkListController.m +++ b/client/iOS/Controllers/BookmarkListController.m @@ -680,10 +680,20 @@ - (void)commitBookmark:(ComputerBookmark *)bookmark { - // if we got a manual bookmark that is not in the list yet - add it - if (![_manual_bookmarks containsObject:bookmark]) + // if we got a manual bookmark that is not in the list yet - add it otherwise replace it + BOOL found = NO; + for (int idx = 0; idx < [_manual_bookmarks count]; ++idx) + { + if ([[bookmark uuid] isEqualToString:[[_manual_bookmarks objectAtIndex:idx] uuid]]) + { + [_manual_bookmarks replaceObjectAtIndex:idx withObject:bookmark]; + found = YES; + break; + } + } + if (!found) [_manual_bookmarks addObject:bookmark]; - + // remove any quick connect history entry with the same hostname NSString* hostname = [[bookmark params] StringForKey:@"hostname"]; if ([_connection_history containsObject:hostname]) diff --git a/client/iOS/FreeRDP/ios_freerdp.m b/client/iOS/FreeRDP/ios_freerdp.m index ea9581fcb..ae3f1e084 100644 --- a/client/iOS/FreeRDP/ios_freerdp.m +++ b/client/iOS/FreeRDP/ios_freerdp.m @@ -99,7 +99,7 @@ static int ios_receive_channel_data(freerdp* instance, int channelId, UINT8* dat void ios_process_channel_event(rdpChannels* channels, freerdp* instance) { - RDP_EVENT* event = freerdp_channels_pop_event(channels); + wMessage* event = freerdp_channels_pop_event(channels); if (event) freerdp_event_free(event); } diff --git a/client/iOS/Models/Bookmark.h b/client/iOS/Models/Bookmark.h index 4594aa5aa..b66eac804 100644 --- a/client/iOS/Models/Bookmark.h +++ b/client/iOS/Models/Bookmark.h @@ -30,6 +30,7 @@ // Creates a copy of this object, with a new UUID - (id)copy; +- (id)copyWithUUID; // Whether user can delete, move, or rename this entry - (BOOL)isDeletable; diff --git a/client/iOS/Models/Bookmark.m b/client/iOS/Models/Bookmark.m index 2ce7903b7..2cdc6dfe2 100644 --- a/client/iOS/Models/Bookmark.m +++ b/client/iOS/Models/Bookmark.m @@ -87,6 +87,13 @@ return copy; } +- (id)copyWithUUID +{ + ComputerBookmark* copy = [self copy]; + copy->_uuid = [[self uuid] copy]; + return copy; +} + - (void)encodeWithCoder:(NSCoder *)coder { if (![coder allowsKeyedCoding])