From 82bec9343bc1c98a7a39557b3d7b00fc3792690b Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 4 Nov 2014 10:58:42 +0100 Subject: [PATCH] Change signature of LinphoneCoreLogCollectionUploadProgressIndicationCb. --- coreapi/linphonecore.c | 6 +++--- coreapi/linphonecore.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 8e6316b54..b09037bf2 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -328,7 +328,7 @@ static int log_collection_upload_on_send_body(belle_sip_user_body_handler_t *bh, */ static void log_collection_upload_on_progress(belle_sip_body_handler_t *bh, belle_sip_message_t *msg, void *data, size_t offset, size_t total) { LinphoneCore *core = (LinphoneCore *)data; - linphone_core_notify_log_collection_upload_progress_indication(core, (size_t)(((double)offset / (double)total) * 100.0)); + linphone_core_notify_log_collection_upload_progress_indication(core, offset, total); } /** @@ -7067,8 +7067,8 @@ void linphone_core_notify_publish_state_changed(LinphoneCore *lc, LinphoneEvent void linphone_core_notify_log_collection_upload_state_changed(LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state, const char *info) { NOTIFY_IF_EXIST(log_collection_upload_state_changed)(lc, state, info); } -void linphone_core_notify_log_collection_upload_progress_indication(LinphoneCore *lc, size_t progress) { - NOTIFY_IF_EXIST(log_collection_upload_progress_indication)(lc, progress); +void linphone_core_notify_log_collection_upload_progress_indication(LinphoneCore *lc, size_t offset, size_t total) { + NOTIFY_IF_EXIST(log_collection_upload_progress_indication)(lc, offset, total); } void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable) { ms_message("Vtable [%p] registered on core [%p]",lc,vtable); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index be9e367a4..a909191ee 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1694,7 +1694,7 @@ typedef void (*LinphoneCoreLogCollectionUploadStateChangedCb)(LinphoneCore *lc, * @param[in] lc LinphoneCore object * @param[in] progress Percentage of the file size of the log collection already uploaded. */ -typedef void (*LinphoneCoreLogCollectionUploadProgressIndicationCb)(LinphoneCore *lc, size_t progress); +typedef void (*LinphoneCoreLogCollectionUploadProgressIndicationCb)(LinphoneCore *lc, size_t offset, size_t total); /** * This structure holds all callbacks that the application should implement.