Commit 4e53c851 authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation on Linux.

parent 0ebeab72
......@@ -54,9 +54,9 @@ BELLESIP_EXPORT const void *belle_sip_memory_body_handler_get_buffer(const belle
#define BELLE_SIP_USER_BODY_HANDLER(obj) BELLE_SIP_CAST(obj,belle_sip_user_body_handler_t)
typedef void (*belle_sip_user_body_handler_recv_callback_t)(belle_sip_user_body_handler_t *obj, belle_sip_message_t *msg, void *user_data, size_t offset, const char* buffer, size_t size);
typedef void (*belle_sip_user_body_handler_recv_callback_t)(belle_sip_user_body_handler_t *obj, belle_sip_message_t *msg, void *user_data, size_t offset, const uint8_t* buffer, size_t size);
typedef int (*belle_sip_user_body_handler_send_callback_t)(belle_sip_user_body_handler_t *obj, belle_sip_message_t *msg, void *user_data, size_t offset, char* buffer, size_t *size);
typedef int (*belle_sip_user_body_handler_send_callback_t)(belle_sip_user_body_handler_t *obj, belle_sip_message_t *msg, void *user_data, size_t offset, uint8_t* buffer, size_t *size);
BELLESIP_EXPORT belle_sip_user_body_handler_t *belle_sip_user_body_handler_new(
size_t total_size,
......
......@@ -195,7 +195,7 @@ const char *multipart_boudary=MULTIPART_BOUNDARY;
const int image_size=250000;
static int on_send_body(belle_sip_user_body_handler_t *bh, belle_sip_message_t *msg, void *data, size_t offset, void *buffer, size_t *size){
static int on_send_body(belle_sip_user_body_handler_t *bh, belle_sip_message_t *msg, void *data, size_t offset, uint8_t *buffer, size_t *size){
size_t end_of_img=sizeof(MULTIPART_BEGIN)+image_size;
if (offset==0){
int partlen=sizeof(MULTIPART_BEGIN);
......@@ -211,7 +211,7 @@ static int on_send_body(belle_sip_user_body_handler_t *bh, belle_sip_message_t *
*size=i-offset;
}else{
*size=sizeof(MULTIPART_END);
strncpy(buffer,MULTIPART_END,*size);
strncpy((char*)buffer,MULTIPART_END,*size);
}
return BELLE_SIP_CONTINUE;
}
......@@ -245,7 +245,7 @@ static void https_post_long_body(void){
belle_sip_object_unref(l);
}
static void on_recv_body(belle_sip_user_body_handler_t *bh, belle_sip_message_t *msg, void *data, size_t offset, const void *buffer, size_t size){
static void on_recv_body(belle_sip_user_body_handler_t *bh, belle_sip_message_t *msg, void *data, size_t offset, const uint8_t *buffer, size_t size){
FILE *file=(FILE*)data;
if (file)
fwrite(buffer,1,size,file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment