From 2f928c41b810d6f744c606fb263ef21a0af2cb79 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 29 Jun 2016 16:45:42 +0200 Subject: [PATCH] Card context has to work even without vCard support for fetching friend from db... Cherry pick from master ae708bdd8cabe0efa5afc102ee7a06e324594847 --- coreapi/vcard_stubs.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/coreapi/vcard_stubs.c b/coreapi/vcard_stubs.c index 916cd541a..26583c455 100644 --- a/coreapi/vcard_stubs.c +++ b/coreapi/vcard_stubs.c @@ -20,15 +20,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "vcard.h" struct _LinphoneVcardContext { - void *dummy; + void *user_data; }; LinphoneVcardContext* linphone_vcard_context_new(void) { - return NULL; + LinphoneVcardContext* context = ms_new0(LinphoneVcardContext, 1); + context->user_data = NULL; + return context; } void linphone_vcard_context_destroy(LinphoneVcardContext *context) { - + if (context) { + ms_free(context); + } } @@ -37,7 +41,7 @@ void* linphone_vcard_context_get_user_data(const LinphoneVcardContext *context) } void linphone_vcard_context_set_user_data(LinphoneVcardContext *context, void *data) { - + if (context) context->user_data = data; } struct _LinphoneVcard {