diff -uprN ave/c/BlueZ.cpp aventana/c/BlueZ.cpp --- ave/c/BlueZ.cpp 2007-07-19 11:21:14.000000000 -0300 +++ aventana/c/BlueZ.cpp 2007-12-18 10:07:27.000000000 -0300 @@ -257,7 +257,7 @@ static int gen_attridseq_pdu(char *dst, * Throws a Java exception if an error occured. Depending on the erro, you will * surely have to call the method exit(1) after this excpetion is thrown */ -void throwException(JNIEnv *env, char *msg) +void throwException(JNIEnv *env, const char *msg) { /* Throw a BlueZException in Java, with the given message */ jclass exception_cls; @@ -1230,7 +1230,7 @@ JNIEXPORT jint JNICALL Java_de_avetana_b * This jobject (a LocalServiceRecord if you are using the Avetana implementation) MUST implement a method * toByteArray(). */ -JNIEXPORT jint JNICALL Java_de_avetana_bluetooth_stack_BlueZ_createService +JNIEXPORT jlong JNICALL Java_de_avetana_bluetooth_stack_BlueZ_createService (JNIEnv *env, jclass obj, jobject srecord) { bdaddr_t interface; @@ -1409,7 +1409,7 @@ JNIEXPORT jint JNICALL Java_de_avetana_b srh->srHandle = handle; - return (jint)srh; + return (jlong)srh; } else return -1; } diff -uprN ave/c/Makefile.in aventana/c/Makefile.in --- ave/c/Makefile.in 2005-06-30 11:59:08.000000000 -0300 +++ aventana/c/Makefile.in 2007-12-18 10:26:15.000000000 -0300 @@ -69,4 +69,4 @@ de_avetana_bluetooth_stack_BlueZ.h: clea # Native language (C) library - libavetanaBT.so libavetanaBT.so: BlueZ.cpp de_avetana_bluetooth_stack_BlueZ.h - $(CC) -shared -lbluetooth $(CFLAGS) BlueZ.cpp -o $(BIN_DIR)/libavetanaBT.so $(LDFLAGS) + $(CC) -fPIC -shared -lbluetooth $(CFLAGS) BlueZ.cpp -o $(BIN_DIR)/libavetanaBT.so $(LDFLAGS) diff -uprN ave/de/avetana/bluetooth/stack/BlueZ.java aventana/de/avetana/bluetooth/stack/BlueZ.java --- ave/de/avetana/bluetooth/stack/BlueZ.java 2007-05-17 17:33:21.000000000 -0300 +++ aventana/de/avetana/bluetooth/stack/BlueZ.java 2007-12-18 10:11:24.000000000 -0300 @@ -413,7 +413,7 @@ public class BlueZ * @return a positive integer is the process succeeds. * @throws BlueZException */ - public static synchronized native int createService(LocalServiceRecord service) throws BlueZException; + public static synchronized native long createService(LocalServiceRecord service) throws BlueZException; /** * Updates an existing service record (the old