forked from mirrors/linphone-iphone
misc: avoid some crashes
This commit is contained in:
parent
29fe24eef3
commit
160b81a6e0
2 changed files with 22 additions and 14 deletions
|
|
@ -163,8 +163,8 @@
|
|||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
[_tableController.tableView removeObserver:self forKeyPath:@"contentSize"];
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
|
|
|||
|
|
@ -1410,16 +1410,20 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
/*DETECT cameras*/
|
||||
_frontCamId = _backCamId = nil;
|
||||
char **camlist = (char **)linphone_core_get_video_devices(theLinphoneCore);
|
||||
for (char *cam = *camlist; *camlist != NULL; cam = *++camlist) {
|
||||
if (strcmp(FRONT_CAM_NAME, cam) == 0) {
|
||||
_frontCamId = cam;
|
||||
// great set default cam to front
|
||||
LOGI(@"Setting default camera [%s]", _frontCamId);
|
||||
linphone_core_set_video_device(theLinphoneCore, _frontCamId);
|
||||
}
|
||||
if (strcmp(BACK_CAM_NAME, cam) == 0) {
|
||||
_backCamId = cam;
|
||||
if (camlist) {
|
||||
for (char *cam = *camlist; *camlist != NULL; cam = *++camlist) {
|
||||
if (strcmp(FRONT_CAM_NAME, cam) == 0) {
|
||||
_frontCamId = cam;
|
||||
// great set default cam to front
|
||||
LOGI(@"Setting default camera [%s]", _frontCamId);
|
||||
linphone_core_set_video_device(theLinphoneCore, _frontCamId);
|
||||
}
|
||||
if (strcmp(BACK_CAM_NAME, cam) == 0) {
|
||||
_backCamId = cam;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOGW(@"No camera detected!");
|
||||
}
|
||||
|
||||
if (![LinphoneManager isNotIphone3G]) {
|
||||
|
|
@ -2089,10 +2093,14 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
|||
}
|
||||
_pushNotificationToken = apushNotificationToken;
|
||||
|
||||
const MSList *proxies = linphone_core_get_proxy_config_list(LC);
|
||||
while (proxies) {
|
||||
[self configurePushTokenForProxyConfig:proxies->data];
|
||||
proxies = proxies->next;
|
||||
@try {
|
||||
const MSList *proxies = linphone_core_get_proxy_config_list(LC);
|
||||
while (proxies) {
|
||||
[self configurePushTokenForProxyConfig:proxies->data];
|
||||
proxies = proxies->next;
|
||||
}
|
||||
} @catch (NSException* e) {
|
||||
LOGW(@"%s: linphone core not ready yet, ignoring push token", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue