From 36de60130b989ba24e29c843a3950f7bde4c94c4 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 10 Sep 2014 10:00:56 +0200 Subject: [PATCH] Fix compilation on Windows. --- coreapi/chat.c | 3 ++- coreapi/lpconfig.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/coreapi/chat.c b/coreapi/chat.c index b36196468..a8795a09b 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -128,6 +128,7 @@ static void linphone_chat_message_process_response_from_post_file(void *data, co belle_http_request_listener_t *l; belle_generic_uri_t *uri; belle_http_request_t *req; + char* ua; /* temporary storage of the header of the message part header */ char *content_type=belle_sip_strdup_printf("%s/%s", msg->file_transfer_information->type, msg->file_transfer_information->subtype); @@ -141,7 +142,7 @@ static void linphone_chat_message_process_response_from_post_file(void *data, co /* insert it in a multipart body handler which will manage the boundaries of multipart message */ belle_sip_multipart_body_handler_t *bh=belle_sip_multipart_body_handler_new(linphone_chat_message_file_transfer_on_progress, msg, (belle_sip_body_handler_t *)first_part_bh); - char* ua = ms_strdup_printf("%s/%s", linphone_core_get_user_agent_name(), linphone_core_get_user_agent_version()); + ua = ms_strdup_printf("%s/%s", linphone_core_get_user_agent_name(), linphone_core_get_user_agent_version()); belle_sip_free(content_type); content_type=belle_sip_strdup_printf("multipart/form-data; boundary=%s",multipart_boundary); diff --git a/coreapi/lpconfig.c b/coreapi/lpconfig.c index ff3f808b2..a2838d4a4 100644 --- a/coreapi/lpconfig.c +++ b/coreapi/lpconfig.c @@ -699,7 +699,7 @@ char *lp_config_read_relative_file(const LpConfig *lpconfig, const char *filenam char *dir = _lp_config_dirname(lpconfig->filename); char *filepath = ms_strdup_printf("%s/%s", dir, filename); char *result = NULL; - if(access(filepath, F_OK) == 0) { + if(ortp_file_exist(filepath) == 0) { FILE *file = fopen(filepath, "r"); if(file != NULL) { result = ms_new0(char, MAX_LEN);