forked from mirrors/linphone-iphone
fix ice settings
This commit is contained in:
parent
ca298e8e14
commit
667280868a
2 changed files with 14 additions and 9 deletions
|
|
@ -103,6 +103,15 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
#pragma mark - Action Functions
|
||||
|
||||
-(void) startChatRoom {
|
||||
//Push ChatRoom
|
||||
ChatRoomViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ChatRoomViewController compositeViewDescription] push:TRUE], ChatRoomViewController);
|
||||
if(controller != nil) {
|
||||
[controller setRemoteAddress:[addressField text]];
|
||||
}
|
||||
addressField.text = @"";
|
||||
|
||||
}
|
||||
- (IBAction)onAddClick:(id)event {
|
||||
if ([[addressField text ]length] == 0) { // if no address is manually set, lauch address book
|
||||
[ContactSelection setSelectionMode:ContactSelectionModeMessage];
|
||||
|
|
@ -110,12 +119,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[ContactSelection setSipFilter:TRUE];
|
||||
[[PhoneMainView instance] changeCurrentView:[ContactsViewController compositeViewDescription] push:TRUE];
|
||||
} else {
|
||||
//Push ChatRoom
|
||||
ChatRoomViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ChatRoomViewController compositeViewDescription] push:TRUE], ChatRoomViewController);
|
||||
if(controller != nil) {
|
||||
[controller setRemoteAddress:[addressField text]];
|
||||
}
|
||||
addressField.text = @"";
|
||||
[self startChatRoom];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,6 +131,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||
[addressField resignFirstResponder];
|
||||
return YES;
|
||||
if ([[addressField text ]length]> 0)
|
||||
[self startChatRoom];
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -162,8 +162,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
{
|
||||
[self setString: linphone_core_get_stun_server(lc) forKey:@"stun_preference"];
|
||||
[self
|
||||
setInteger:lp_config_get_int(linphone_core_get_config(lc),"app","ice_preference"
|
||||
, 0) forKey:@"ice_preference"];
|
||||
setBool:linphone_core_get_firewall_policy(lc)==LinphonePolicyUseIce forKey:@"ice_preference"];
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue