diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 7a3e5febf..b8971edd5 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -475,7 +475,7 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr call->op=sal_op_new(lc->sal); sal_op_set_user_pointer(call->op,call); call->core=lc; - linphone_core_get_local_ip(lc,linphone_address_get_domain(to),call->localip); + linphone_core_get_local_ip(lc,NULL,call->localip); linphone_call_init_common(call,from,to); _linphone_call_params_copy(&call->params,params); sal_op_set_custom_header(call->op,call->params.custom_headers); @@ -534,7 +534,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro } linphone_address_clean(from); - linphone_core_get_local_ip(lc,linphone_address_get_domain(from),call->localip); + linphone_core_get_local_ip(lc,NULL,call->localip); linphone_call_init_common(call, from, to); call->log->call_id=ms_strdup(sal_op_get_call_id(op)); /*must be known at that time*/ linphone_core_init_default_params(lc, &call->params); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 8b3e1b04c..3b1289778 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1219,9 +1219,8 @@ void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const } static void misc_config_read (LinphoneCore *lc) { LpConfig *config=lc->config; - lc->max_call_logs=lp_config_get_int(config,"misc","history_max_size",15); - lc->max_calls=lp_config_get_int(config,"misc","max_calls",NB_MAX_CALLS); - linphone_core_set_log_level((OrtpLogLevel)lp_config_get_int(config,"misc","log_level",0)); + lc->max_call_logs=lp_config_get_int(config,"misc","history_max_size",15); + lc->max_calls=lp_config_get_int(config,"misc","max_calls",NB_MAX_CALLS); } @@ -2183,9 +2182,6 @@ void linphone_core_iterate(LinphoneCore *lc){ } if (one_second_elapsed) { - if (ortp_get_log_level_mask() != lp_config_get_int(lc->config, "misc", "log_level", 0)) { - lp_config_set_int(lc->config, "misc", "log_level", ortp_get_log_level_mask()); - } if (lp_config_needs_commit(lc->config)) { lp_config_sync(lc->config); } diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index ddc26f657..5046d83bb 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1871,6 +1871,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(J return (jlong) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr); } +extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getTime(JNIEnv* env + ,jobject thiz + ,jlong ptr) { + return (jlong) linphone_chat_message_get_time((LinphoneChatMessage*)ptr); +} + extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env ,jobject thiz ,jlong ptr diff --git a/java/common/org/linphone/core/LinphoneChatMessage.java b/java/common/org/linphone/core/LinphoneChatMessage.java index 3a2a45718..b6b6c30ec 100644 --- a/java/common/org/linphone/core/LinphoneChatMessage.java +++ b/java/common/org/linphone/core/LinphoneChatMessage.java @@ -106,4 +106,10 @@ public interface LinphoneChatMessage { * @return the value of the header, or null if not found. */ String getCustomHeader(String name); + + /** + * Gets the time at which the message was sent + * @return the time in milliseconds + */ + long getTime(); } diff --git a/java/impl/org/linphone/core/LinphoneChatMessageImpl.java b/java/impl/org/linphone/core/LinphoneChatMessageImpl.java index 1373708ca..2a256f2f5 100644 --- a/java/impl/org/linphone/core/LinphoneChatMessageImpl.java +++ b/java/impl/org/linphone/core/LinphoneChatMessageImpl.java @@ -8,6 +8,7 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage { private native String getExternalBodyUrl(long ptr); private native void setExternalBodyUrl(long ptr, String url); private native long getFrom(long ptr); + private native long getTime(long ptr); protected LinphoneChatMessageImpl(long aNativePtr) { nativePtr = aNativePtr; @@ -64,4 +65,8 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage { public String getCustomHeader(String name) { return getCustomHeader(nativePtr,name); } + + public long getTime() { + return getTime(nativePtr); + } }