diff options
author | Martijn Coenen <maco@google.com> | 2012-01-27 12:27:08 -0800 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-01-27 13:24:23 -0800 |
commit | 3b82eef50f734cab061330f55de8b8bf5396f24b (patch) | |
tree | ba6471e129ed55eeeda9f194bab74c2849b183ca /jni/com_android_nfc_NativeLlcpSocket.cpp | |
parent | 6f0e3b8e1de5137077127bf3144effa2016c27c6 (diff) | |
download | packages_apps_nfc-3b82eef50f734cab061330f55de8b8bf5396f24b.zip packages_apps_nfc-3b82eef50f734cab061330f55de8b8bf5396f24b.tar.gz packages_apps_nfc-3b82eef50f734cab061330f55de8b8bf5396f24b.tar.bz2 |
LLCP 1.1 support.
- Allow servicename for connectionless sockets;
- Pass in servicename in Bind() for both types;
- EchoServer: allow MIU=128 again since ATR_RES
fix was merged in libnfc-nxp
- EchoServer: fix reading from incorrect offset.
Change-Id: Ie77fe5b46e7a17435e6261c8b7400dcca4d3784a
Diffstat (limited to 'jni/com_android_nfc_NativeLlcpSocket.cpp')
-rw-r--r-- | jni/com_android_nfc_NativeLlcpSocket.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jni/com_android_nfc_NativeLlcpSocket.cpp b/jni/com_android_nfc_NativeLlcpSocket.cpp index 046ef6a..0c0b830 100644 --- a/jni/com_android_nfc_NativeLlcpSocket.cpp +++ b/jni/com_android_nfc_NativeLlcpSocket.cpp @@ -167,7 +167,7 @@ static jboolean com_android_nfc_NativeLlcpSocket_doConnectBy(JNIEnv *e, jobject { NFCSTATUS ret; struct timespec ts; - phNfc_sData_t serviceName; + phNfc_sData_t serviceName = {0}; phLibNfc_Handle hRemoteDevice; phLibNfc_Handle hLlcpSocket; struct nfc_jni_callback_data cb_data; @@ -217,6 +217,9 @@ static jboolean com_android_nfc_NativeLlcpSocket_doConnectBy(JNIEnv *e, jobject result = JNI_TRUE; clean_and_return: + if (serviceName.buffer != NULL) { + e->ReleaseStringUTFChars(sn, (const char *)serviceName.buffer); + } nfc_cb_data_deinit(&cb_data); return result; } |