summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Jung <jh8801.jung@samsung.com>2017-01-05 04:58:13 (GMT)
committerJihoon Jung <jh8801.jung@samsung.com>2017-01-05 08:04:41 (GMT)
commit621ec03527db5be638f88777e3b95666522c315d (patch)
tree6a0bd28b0a217eb31c06a6e73492762d57f6ed35
parentcadfd061aa04fcfbe0fc77c5165f72e0286dba60 (diff)
downloadsmartcard-accepted/tizen/mobile/20170106.103902.zip
smartcard-accepted/tizen/mobile/20170106.103902.tar.gz
smartcard-accepted/tizen/mobile/20170106.103902.tar.bz2
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com> Change-Id: I3b124cd8fa847d19a7f755bd51b4caf3d6ab7076
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardErrorFactory.cs4
-rwxr-xr-x[-rw-r--r--]Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs9
-rwxr-xr-x[-rw-r--r--]Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManagerImpl.cs1
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs3
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs6
-rw-r--r--packaging/csapi-network-smartcard.spec2
6 files changed, 16 insertions, 9 deletions
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardErrorFactory.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardErrorFactory.cs
index 70fafb9..a562a2f 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardErrorFactory.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardErrorFactory.cs
@@ -60,6 +60,10 @@ namespace Tizen.Network.Smartcard
{
throw new ArgumentException(err.ToString());
}
+ else if (err == SmartcardError.NotSupportedError)
+ {
+ throw new NotSupportedException(err.ToString());
+ }
else
{
throw new InvalidOperationException(err.ToString());
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
index b5d1903..1627cf8 100644..100755
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
@@ -32,7 +32,14 @@ namespace Tizen.Network.Smartcard
/// <returns>List of SmartcardReader objects.</returns>
static public IEnumerable<SmartcardReader> GetReaders()
{
- return SmartcardManagerImpl.Instance.GetReaders();
+ try
+ {
+ return SmartcardManagerImpl.Instance.GetReaders();
+ }
+ catch (TypeInitializationException e)
+ {
+ throw e.InnerException;
+ }
}
}
}
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManagerImpl.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManagerImpl.cs
index e7a0f9c..5e4db7f 100644..100755
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManagerImpl.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManagerImpl.cs
@@ -91,7 +91,6 @@ namespace Tizen.Network.Smartcard
if (ret != (int)SmartcardError.None)
{
Log.Error(Globals.LogTag, "Failed to deinitialize smartcard, Error - " + (SmartcardError)ret);
- SmartcardErrorFactory.ThrowSmartcardException(ret);
}
}
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
index 6ffde7d..bfa1266 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
@@ -141,8 +141,7 @@ namespace Tizen.Network.Smartcard
foreach (SmartcardSession session in _sessionList)
{
- session.Dispose();
- _sessionList.Remove(session);
+ session.Close();
}
}
}
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
index afd4179..bdadf29 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
@@ -174,14 +174,12 @@ namespace Tizen.Network.Smartcard
foreach (SmartcardChannel channel in _basicChannelList)
{
- channel.Dispose();
- _basicChannelList.Remove(channel);
+ channel.Close();
}
foreach (SmartcardChannel channel in _logicalChannelList)
{
- channel.Dispose();
- _logicalChannelList.Remove(channel);
+ channel.Close();
}
}
diff --git a/packaging/csapi-network-smartcard.spec b/packaging/csapi-network-smartcard.spec
index 52a3946..9f8efcc 100644
--- a/packaging/csapi-network-smartcard.spec
+++ b/packaging/csapi-network-smartcard.spec
@@ -8,7 +8,7 @@
Name: csapi-network-smartcard
Summary: Tizen Smartcard API for C#
-Version: 1.0.2
+Version: 1.0.3
Release: 1
Group: Development/Libraries
License: Apache-2.0