/soc/2012/michael/android: 76d16726ae02: Added debug messages to...

Michael Zangl michael at soc.pidgin.im
Tue Aug 7 07:13:33 EDT 2012


Changeset: 76d16726ae026c258de3a357bea535ec18ca7fcb
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-08-07 12:44 +0200
Branch:	 soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/76d16726ae02

Description:

Added debug messages to socket creation and a note where Android 4.0 crashes.

diffstat:

 android/workspace/im.pidgin.libpurple/native/SslOps.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (23 lines):

diff --git a/android/workspace/im.pidgin.libpurple/native/SslOps.c b/android/workspace/im.pidgin.libpurple/native/SslOps.c
--- a/android/workspace/im.pidgin.libpurple/native/SslOps.c
+++ b/android/workspace/im.pidgin.libpurple/native/SslOps.c
@@ -55,6 +55,8 @@ get_inet_addr(JNIEnv *env, PurpleSslConn
 	address = (*env)->CallStaticObjectMethod(env, inetAddrClass, inetAddrConstructionMid, address_data);
 	g_return_val_if_fail(address != NULL, NULL);
 
+	g_log("jni", G_LOG_LEVEL_DEBUG, "created inet address %p for fd %d.", address, gsc->fd);
+
 	(*env)->DeleteLocalRef(env, inetAddrClass);
 	(*env)->DeleteLocalRef(env, address_data);
 	return address;
@@ -125,8 +127,10 @@ fd_to_socket(JNIEnv *env, PurpleSslConne
 	socketAcceptedMid = getMethodIDCachedReferenced(env, socketClass,
 			&socketAccepted);
 	g_return_val_if_fail(socketAcceptedMid != NULL, NULL);
+	/* Android 4 crashes here... */
 	(*env)->CallVoidMethod(env, socket, socketAcceptedMid);
 
+	g_log("jni", G_LOG_LEVEL_DEBUG, "created socket %p for fd %d.", socket, gsc->fd);
 
 	(*env)->DeleteLocalRef(env, fd);
 	(*env)->DeleteLocalRef(env, fdClass);



More information about the Commits mailing list