From a0d26764c09212a41ccf5f467257ab699c848a6d Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Wed, 19 Nov 2014 13:12:29 +0100 Subject: [PATCH] Use linphone_content_* API --- Classes/LinphoneUI/UIStateBar.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Classes/LinphoneUI/UIStateBar.m b/Classes/LinphoneUI/UIStateBar.m index cbce51121..14debb2c0 100644 --- a/Classes/LinphoneUI/UIStateBar.m +++ b/Classes/LinphoneUI/UIStateBar.m @@ -160,14 +160,13 @@ int messagesUnreadCount; const LinphoneContent * content = [[notif.userInfo objectForKey: @"content"] pointerValue]; if ((content == NULL) - || (strcmp("application", content->type) != 0) - || (strcmp("simple-message-summary", content->subtype) != 0) - || (content->data == NULL)) { + || (strcmp("application", linphone_content_get_type(content)) != 0) + || (strcmp("simple-message-summary", linphone_content_get_subtype(content)) != 0) + || (linphone_content_get_data(content) == NULL)) { return; } - - const char * body = (const char*) content->data; - if ((body = strstr(body, "voice-message: ")) == NULL) { + const char* body = linphone_content_get_data(content); + if ((body = strstr(body, "voice-message: ")) == NULL) { [LinphoneLogger log:LinphoneLoggerWarning format:@"Received new NOTIFY from voice mail but could not find 'voice-message' in BODY. Ignoring it."]; return; }