Fix problems
authorWonkyu Kwon <wonkyu.kwon@samsung.com>
Fri, 19 Jul 2013 06:54:05 +0000 (15:54 +0900)
committerWonkyu Kwon <wonkyu.kwon@samsung.com>
Wed, 24 Jul 2013 08:56:39 +0000 (17:56 +0900)
 - fix TLVHelper is not clear old member values.
 - fis wrong callback assigned.

Change-Id: I96afe568afd66c74fa62fa4968735b8f9fda2159

client/ClientChannel.cpp
common/PKCS15DODF.cpp
common/TLVHelper.cpp

index bbf6988..96f7ee8 100644 (file)
@@ -410,7 +410,7 @@ namespace smartcard_service_api
                                GPOINTER_TO_UINT(context),
                                GPOINTER_TO_UINT(handle),
                                var_command, NULL,
-                               &ClientChannel::channel_close_cb, param);
+                               &ClientChannel::channel_transmit_cb, param);
 
                        result = SCARD_ERROR_OK;
 #else
index 9177a02..86514c7 100644 (file)
@@ -98,10 +98,9 @@ namespace smartcard_service_api
                                {
                                        PKCS15OID oid(tlv.getValue());
 
-                                       _DBG("OID DataObject");
+                                       _DBG("OID DataObject : %s", oid.getOID().toString().c_str());
 
-                                       pair<ByteArray, PKCS15OID> newPair(oid.getOID(), oid);
-                                       mapOID.insert(newPair);
+                                       mapOID.insert(make_pair(oid.getOID(), oid));
                                }
                                break;
 
index 2b77288..85406dd 100644 (file)
@@ -61,6 +61,13 @@ namespace smartcard_service_api
                if (array.size() == 0)
                        return false;
 
+               currentTLV = this;
+               parentTLV = parent;
+               childTLV = NULL;
+               offset = 0;
+               currentT = 0;
+               currentL = 0;
+
                tlvBuffer = array;
 
                return true;