print error message instead of (null)

This commit is contained in:
Simon Morlat 2010-07-06 12:49:41 +02:00
parent dc959b97bd
commit 61677ff44a
3 changed files with 6 additions and 4 deletions

View file

@ -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);
}
};

View file

@ -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);
}

@ -1 +1 @@
Subproject commit 44d29b3dcc1261f9999dfd6d02f86ccee0a18873
Subproject commit 7a8923072b42246db45d122798f2ab62e2f46bd0