From 61677ff44a00aa7cf4760a6faa34177e4faf4387 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 6 Jul 2010 12:49:41 +0200 Subject: [PATCH] print error message instead of (null) --- coreapi/linphonecore_jni.cc | 5 +++-- java/common/org/linphone/core/LinphoneCoreListener.java | 3 ++- mediastreamer2 | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 958170e24..fcf3cc1ce 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -83,7 +83,7 @@ public: /*displayStatus(LinphoneCore lc,String message);*/ displayStatusId = env->GetMethodID(listernerClass,"displayStatus","(Lorg/linphone/core/LinphoneCore;Ljava/lang/String;)V"); /*void generalState(LinphoneCore lc,int state); */ - generalStateId = env->GetMethodID(listernerClass,"generalState","(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneCore$GeneralState;)V"); + generalStateId = env->GetMethodID(listernerClass,"generalState","(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneCore$GeneralState;Ljava/lang/String;)V"); generalStateClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneCore$GeneralState")); generalStateFromIntId = env->GetStaticMethodID(generalStateClass,"fromInt","(I)Lorg/linphone/core/LinphoneCore$GeneralState;"); @@ -145,7 +145,8 @@ public: env->CallVoidMethod(lcData->listener ,lcData->generalStateId ,lcData->core - ,env->CallStaticObjectMethod(lcData->generalStateClass,lcData->generalStateFromIntId,gstate->new_state)); + ,env->CallStaticObjectMethod(lcData->generalStateClass,lcData->generalStateFromIntId,gstate->new_state), + gstate->message ? env->NewStringUTF(gstate->message) : NULL); } }; diff --git a/java/common/org/linphone/core/LinphoneCoreListener.java b/java/common/org/linphone/core/LinphoneCoreListener.java index f48f8a9eb..be75b946d 100644 --- a/java/common/org/linphone/core/LinphoneCoreListener.java +++ b/java/common/org/linphone/core/LinphoneCoreListener.java @@ -47,5 +47,6 @@ public interface LinphoneCoreListener { * @param state LinphoneCore.GeneralState * @return * */ - public void generalState(LinphoneCore lc,LinphoneCore.GeneralState state); + public void generalState(LinphoneCore lc,LinphoneCore.GeneralState state, String message); } + diff --git a/mediastreamer2 b/mediastreamer2 index 44d29b3dc..7a8923072 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 44d29b3dcc1261f9999dfd6d02f86ccee0a18873 +Subproject commit 7a8923072b42246db45d122798f2ab62e2f46bd0