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;
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;
&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);
&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);
_BEGIN();
if (isSecureElementPresent() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
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,
_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) {
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");
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");
try
{
- service = new SEService(user_data, (serviceConnected)callback);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)callback);
}
catch (...)
{
try
{
- service = new SEService(user_data, (serviceConnected)connected);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)connected);
}
catch (...)
{
try
{
- service = new SEService(user_data);
+ service = new (std::nothrow)SEService(user_data);
}
catch (ExceptionBase &e)
{
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) {
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;
closed = true;
closeChannels();
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
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) {
if (getReader()->isSecureElementPresent() == true) {
GVariant *var_aid;
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;