summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjh8801.jung <jh8801.jung@samsung.com>2017-06-09 15:22:00 +0900
committerjh8801.jung <jh8801.jung@samsung.com>2017-06-09 15:22:34 +0900
commit4c7171add9cdca7f0f7f75d7ecf1978bd82c2690 (patch)
tree15b2c886e54b11b7a7e0fafbb62b3e43c92c2fb2
parent7a08e38d3851e28d966d8c4b5ea739d20ba40b6e (diff)
downloadsmartcard-accepted/tizen_3.0_ivi.tar.gz
smartcard-accepted/tizen_3.0_ivi.tar.bz2
smartcard-accepted/tizen_3.0_ivi.zip
Signed-off-by: jh8801.jung <jh8801.jung@samsung.com> Change-Id: If04aa745453fe7ecd9c3cc6de23745be5e65502e
-rw-r--r--src/ClientChannel.cpp4
-rw-r--r--src/Reader.cpp6
-rwxr-xr-xsrc/SEService.cpp16
-rw-r--r--src/Session.cpp10
4 files changed, 18 insertions, 18 deletions
diff --git a/src/ClientChannel.cpp b/src/ClientChannel.cpp
index b30e2e1..4901724 100644
--- a/src/ClientChannel.cpp
+++ b/src/ClientChannel.cpp
@@ -205,7 +205,7 @@ namespace smartcard_service_api
if (isClosed() == false) {
if (getSession()->getReader()->isSecureElementPresent() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
@@ -270,7 +270,7 @@ namespace smartcard_service_api
if (getSession()->getReader()->isSecureElementPresent() == true) {
GVariant *var_command;
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
diff --git a/src/Reader.cpp b/src/Reader.cpp
index 06857ed..67cc896 100644
--- a/src/Reader.cpp
+++ b/src/Reader.cpp
@@ -108,7 +108,7 @@ namespace smartcard_service_api
&result, &session_id, NULL, &error) == true) {
if (result == SCARD_ERROR_OK) {
/* create new instance of channel */
- session = new Session(context, this,
+ session = new (std::nothrow)Session(context, this,
GUINT_TO_POINTER(session_id));
if (session != NULL) {
sessions.push_back(session);
@@ -162,7 +162,7 @@ namespace smartcard_service_api
&result, &handle, res, &error) == true) {
if (result == SCARD_ERROR_OK) {
/* create new instance of channel */
- session = new Session(reader->context, reader,
+ session = new (std::nothrow)Session(reader->context, reader,
GUINT_TO_POINTER(handle));
if (session != NULL) {
reader->sessions.push_back(session);
@@ -194,7 +194,7 @@ namespace smartcard_service_api
_BEGIN();
if (isSecureElementPresent() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
diff --git a/src/SEService.cpp b/src/SEService.cpp
index 6c3882f..5f7c6ba 100755
--- a/src/SEService.cpp
+++ b/src/SEService.cpp
@@ -100,14 +100,14 @@ namespace smartcard_service_api
SEServiceListener *listener)
throw(ErrorIO &, ErrorIllegalParameter &)
{
- return new SEService(user_data, listener);
+ return new (std::nothrow)SEService(user_data, listener);
}
SEService *SEService::createInstance(void *user_data,
serviceConnected handler)
throw(ErrorIO &, ErrorIllegalParameter &)
{
- return new SEService(user_data, handler);
+ return new (std::nothrow)SEService(user_data, handler);
}
void SEService::reader_inserted(GObject *source_object,
@@ -119,7 +119,7 @@ namespace smartcard_service_api
_INFO("[MSG_NOTIFY_SE_INSERTED]");
/* add readers */
- reader = new Reader(service->context,
+ reader = new (std::nothrow)Reader(service->context,
reader_name, GUINT_TO_POINTER(reader_id));
if (reader != NULL) {
@@ -471,7 +471,7 @@ namespace smartcard_service_api
SECURE_LOGD("Reader : name [%s], handle [%08x]", name, handle);
/* add readers */
- reader = new Reader(GUINT_TO_POINTER(this->handle), name, GUINT_TO_POINTER(handle));
+ reader = new (std::nothrow)Reader(GUINT_TO_POINTER(this->handle), name, GUINT_TO_POINTER(handle));
if (reader == NULL)
{
_ERR("alloc failed");
@@ -526,7 +526,7 @@ namespace smartcard_service_api
SECURE_LOGD("Reader [%d] : name [%s], handle [%p]", i, name, handle);
/* add readers */
- reader = new Reader(context, name, handle);
+ reader = new (std::nothrow)Reader(context, name, handle);
if (reader == NULL)
{
_ERR("alloc failed");
@@ -562,7 +562,7 @@ EXTERN_API se_service_h se_service_create_instance(void *user_data,
try
{
- service = new SEService(user_data, (serviceConnected)callback);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)callback);
}
catch (...)
{
@@ -580,7 +580,7 @@ EXTERN_API se_service_h se_service_create_instance_with_event_callback(
try
{
- service = new SEService(user_data, (serviceConnected)connected);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)connected);
}
catch (...)
{
@@ -597,7 +597,7 @@ EXTERN_API se_service_h se_service_create_instance_sync(void *user_data,
try
{
- service = new SEService(user_data);
+ service = new (std::nothrow)SEService(user_data);
}
catch (ExceptionBase &e)
{
diff --git a/src/Session.cpp b/src/Session.cpp
index 5089a4b..01c938a 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -172,7 +172,7 @@ namespace smartcard_service_api
var_response, response);
/* create new instance of channel */
- channel = new ClientChannel(session->context,
+ channel = new (std::nothrow)ClientChannel(session->context,
session, channel_id,
response, GUINT_TO_POINTER(channel_id));
if (channel != NULL) {
@@ -290,7 +290,7 @@ namespace smartcard_service_api
if (getReader()->isSecureElementPresent() == true) {
if (atr.isEmpty() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
@@ -360,7 +360,7 @@ namespace smartcard_service_api
closed = true;
closeChannels();
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
@@ -424,7 +424,7 @@ namespace smartcard_service_api
var_response, response);
/* create new instance of channel */
- channel = new ClientChannel(context,
+ channel = new (std::nothrow)ClientChannel(context,
this, channel_number,
response, GUINT_TO_POINTER(channel_id));
if (channel != NULL) {
@@ -461,7 +461,7 @@ namespace smartcard_service_api
if (getReader()->isSecureElementPresent() == true) {
GVariant *var_aid;
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;