/soc/2012/michael/android: 932ee24ae0b3: reated a working host b...
Michael Zangl
michael at soc.pidgin.im
Tue Jul 17 11:17:05 EDT 2012
Changeset: 932ee24ae0b3933fe2a1587d48ce755f2d10644a
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-07-17 17:15 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/932ee24ae0b3
Description:
reated a working host build configuration and adapted logging to it.
diffstat:
.hgignore | 2 ++
android/workspace/im.pidgin.libpurple/native/CoreManager.c | 8 ++++----
android/workspace/im.pidgin.libpurple/native/GHashTableReference.c | 2 +-
android/workspace/im.pidgin.libpurple/native/GListReference.c | 2 +-
android/workspace/im.pidgin.libpurple/native/PurplePluginManager.c | 2 --
android/workspace/im.pidgin.libpurple/native/helpers.c | 6 +++---
android/workspace/im.pidgin.libpurple/native/helpers.h | 2 +-
android/workspace/im.pidgin.libpurple/native/logging.c | 5 +++--
8 files changed, 15 insertions(+), 14 deletions(-)
diffs (147 lines):
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -120,7 +120,9 @@
android/workspace/im\.pidgin\.libpurple/bin/.*
android/workspace/im\.pidgin\.libpurple/native/\.javah-tmp
android/workspace/im\.pidgin\.libpurple/Android
+android/workspace/im\.pidgin\.libpurple/X86
android/workspace/im\.pidgin\.libpurple\.testclient/gen/.*
android/workspace/im\.pidgin\.libpurple\.testclient/bin/.*
android/workspace/im\.pidgin\.libpurple/gen/.*
+
diff --git a/android/workspace/im.pidgin.libpurple/native/CoreManager.c b/android/workspace/im.pidgin.libpurple/native/CoreManager.c
--- a/android/workspace/im.pidgin.libpurple/native/CoreManager.c
+++ b/android/workspace/im.pidgin.libpurple/native/CoreManager.c
@@ -56,9 +56,9 @@
setJavaObject(&coreManagerInstance, env, obj);
/* plugins init */
+ g_log("jni", G_LOG_LEVEL_INFO, "starting core");
__android_log_print(ANDROID_LOG_WARN, "jni", "loading plugins");
- __android_log_print(ANDROID_LOG_WARN, "jni", "starting core");
purple_core_set_ui_ops(&coreUiOps);
purple_eventloop_set_ui_ops(getEventloopUiOps());
@@ -69,12 +69,12 @@
(*env)->ReleaseStringUTFChars(env, uiName, uiNameNative);
if (success) {
- __android_log_print(ANDROID_LOG_INFO, "jni", "loading blist");
+ g_log("jni", G_LOG_LEVEL_INFO, "loading blist");
purple_set_blist(purple_blist_new());
purple_blist_load();
- __android_log_print(ANDROID_LOG_INFO, "jni", "loaded plugins: %i",
+ g_log("jni", G_LOG_LEVEL_INFO, "loaded plugins: %i",
g_list_length(purple_plugins_get_all()));
- __android_log_print(ANDROID_LOG_INFO, "jni",
+ g_log("jni", G_LOG_LEVEL_INFO,
"loaded protocol plugins: %i",
g_list_length(purple_plugins_get_protocols()));
//purple_plugins_load_saved("/plugins/loaded");
diff --git a/android/workspace/im.pidgin.libpurple/native/GHashTableReference.c b/android/workspace/im.pidgin.libpurple/native/GHashTableReference.c
--- a/android/workspace/im.pidgin.libpurple/native/GHashTableReference.c
+++ b/android/workspace/im.pidgin.libpurple/native/GHashTableReference.c
@@ -102,7 +102,7 @@
GHashTableIter *iter;
iter = (GHashTableIter*) longToP(it);
- free(iter);
+ g_free(iter);
}
/*
* Class: im_pidgin_libpurple_glib_GHashTableReference
diff --git a/android/workspace/im.pidgin.libpurple/native/GListReference.c b/android/workspace/im.pidgin.libpurple/native/GListReference.c
--- a/android/workspace/im.pidgin.libpurple/native/GListReference.c
+++ b/android/workspace/im.pidgin.libpurple/native/GListReference.c
@@ -16,7 +16,7 @@
Java_im_pidgin_libpurple_glib_GListReference_length_1native(JNIEnv *env,
jobject obj)
{
- __android_log_print(ANDROID_LOG_INFO, "jni", "list: %p. length: %i",
+ g_log("jni", G_LOG_LEVEL_DEBUG, "list: %p. length: %i",
(void *) getGList(env, obj), g_list_length(getGList(env, obj)));
return g_list_length(getGList(env, obj));
}
diff --git a/android/workspace/im.pidgin.libpurple/native/PurplePluginManager.c b/android/workspace/im.pidgin.libpurple/native/PurplePluginManager.c
--- a/android/workspace/im.pidgin.libpurple/native/PurplePluginManager.c
+++ b/android/workspace/im.pidgin.libpurple/native/PurplePluginManager.c
@@ -12,8 +12,6 @@
JNIEnv *env, jobject obj)
{
GList *list = purple_plugins_get_protocols();
- __android_log_print(ANDROID_LOG_INFO, "jni", "loaded plugins: %i %p",
- g_list_length(list), (void *) list);
return pToLong(list);
}
diff --git a/android/workspace/im.pidgin.libpurple/native/helpers.c b/android/workspace/im.pidgin.libpurple/native/helpers.c
--- a/android/workspace/im.pidgin.libpurple/native/helpers.c
+++ b/android/workspace/im.pidgin.libpurple/native/helpers.c
@@ -48,12 +48,12 @@
jclass class = (*env)->FindClass(env,
"im/pidgin/libpurple/peering/Peered");
if (class == NULL) {
- __android_log_print(ANDROID_LOG_ERROR, "jni", "Could not find peered class");
+ g_log("jni", G_LOG_LEVEL_ERROR, "Could not find peered class");
return NULL;
}
peerField = (*env)->GetFieldID(env, class, "nativePointer", "J");
if (peerField == NULL) {
- __android_log_print(ANDROID_LOG_ERROR, "jni", "Could not find field for peer");
+ g_log("jni", G_LOG_LEVEL_ERROR, "Could not find field for peer");
return NULL;
}
}
@@ -62,7 +62,7 @@
}
jmethodID
-getMethodIDCachedReferenced(JNIEnv *env, jclass *class,
+getMethodIDCachedReferenced(JNIEnv *env, jclass class,
JavaMethodIDCache *cache)
{
g_return_val_if_fail(env != NULL, NULL);
diff --git a/android/workspace/im.pidgin.libpurple/native/helpers.h b/android/workspace/im.pidgin.libpurple/native/helpers.h
--- a/android/workspace/im.pidgin.libpurple/native/helpers.h
+++ b/android/workspace/im.pidgin.libpurple/native/helpers.h
@@ -82,7 +82,7 @@
void *getNativePointer(JNIEnv *env, jobject peered);
-jmethodID getMethodIDCachedReferenced(JNIEnv *env, jclass *class, JavaMethodIDCache *cache);
+jmethodID getMethodIDCachedReferenced(JNIEnv *env, jclass class, JavaMethodIDCache *cache);
//jmethodID getMethodIDCached(JNIEnv env, jclass class, const char *name, const char *signature, JavaMethodIDCache cache);
diff --git a/android/workspace/im.pidgin.libpurple/native/logging.c b/android/workspace/im.pidgin.libpurple/native/logging.c
--- a/android/workspace/im.pidgin.libpurple/native/logging.c
+++ b/android/workspace/im.pidgin.libpurple/native/logging.c
@@ -16,7 +16,7 @@
static void
debugPrint(PurpleDebugLevel level, const char *category, const char *arg_s)
{
- g_log(category, G_LOG_LEVEL_DEBUG, arg_s);
+ g_log(category, G_LOG_LEVEL_DEBUG, "%s", arg_s);
}
#ifndef X86
@@ -68,7 +68,6 @@
g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \
| G_LOG_FLAG_RECURSION, \
glibLogHandler, NULL)
-#endif
/* Register the glib/gtk log handlers. */
REGISTER_G_LOG_HANDLER(NULL);
@@ -82,6 +81,8 @@
#ifdef USE_GSTREAMER
REGISTER_G_LOG_HANDLER("GStreamer");
#endif
+#endif
+
purple_debug_set_ui_ops(&debugUiOps);
}
More information about the Commits
mailing list