Пример #1
0
void OTCaller::delCallback() 
{ 
	//	if (NULL != _callback)  // TODO this may be a memory leak.
	//		delete _callback;	// But I know we're currently crashing from deleting same object twice.
	// And since the object comes from Java, who am I to delete it? Let Java clean it up.
	if (isCallbackSet())
		OTLog::Output(0, "OTCaller::delCallback: WARNING: setting existing callback object pointer to NULL. "
					  "(This message doesn't trigger if it was already NULL.)\n");
	//--------------------------------
	_callback = NULL; 
}
Пример #2
0
void OTCaller::callTwo() 
{ 
	ZeroOutPassword(); // Make sure there isn't some old password still in here.
	
	if (isCallbackSet()) 
	{ 
		OTLog::Output(0, "OTCaller::callTwo: FYI, Executing password callback (two)...\n");		
		_callback->runTwo(this->GetDisplay(), m_Password);
	}
	else
	{
		OTLog::Output(0, "OTCaller::callTwo: WARNING: Failed attempt to trigger password callback (two), due to \"it hasn't been set yet.\"\n");
	}	
}
Пример #3
0
void OTCaller::delCallback()
{
    //    if (nullptr != _callback)  // TODO this may be a memory leak.
    //        delete _callback;    // But I know we're currently crashing from
    // deleting same object twice.
    // And since the object comes from Java, who am I to delete it? Let Java
    // clean it up.
    if (isCallbackSet())
        otOut << "OTCaller::delCallback: WARNING: setting existing callback "
                 "object pointer to nullptr. "
                 "(This message doesn't trigger if it was already nullptr.)\n";

    _callback = nullptr;
}
Пример #4
0
void OTCaller::callTwo()
{
    ZeroOutPassword(); // Make sure there isn't some old password still in here.

    if (isCallbackSet()) {
        otOut
            << "OTCaller::callTwo: FYI, Executing password callback (two)...\n";
        _callback->runTwo(GetDisplay(), m_Password);
    }
    else {
        otOut << "OTCaller::callTwo: WARNING: Failed attempt to trigger "
                 "password callback (two), due to \"it hasn't been set "
                 "yet.\"\n";
    }
}