Commit 166462a9 authored by Brendan Long's avatar Brendan Long

Convert AllJoyn errors to strings before printing.

parent e9166608
......@@ -46,7 +46,7 @@ bridge::DeviceSystemBridge::Initialize()
st = AllJoynInit();
if (st != ER_OK)
{
DSBLOG_WARN("Failed to initialize AllJoyn: 0x%x", st);
DSBLOG_WARN("Failed to initialize AllJoyn: %s", QCC_StatusText(st));
goto Leave;
}
m_alljoynInitialized = true;
......@@ -77,7 +77,7 @@ bridge::DeviceSystemBridge::InitializeInternal()
st = InitializeAdapter();
if (st != ER_OK)
{
DSBLOG_WARN("Failed to intialize adapter: 0x%x", st);
DSBLOG_WARN("Failed to intialize adapter: %s", QCC_StatusText(st));
goto Leave;
}
......@@ -90,14 +90,14 @@ bridge::DeviceSystemBridge::InitializeInternal()
st = InitializeDevices();
if (st != ER_OK)
{
DSBLOG_WARN("Failed to initialize devices: 0x%x", st);
DSBLOG_WARN("Failed to initialize devices: %s", QCC_StatusText(st));
goto Leave;
}
st = RegisterAdapterSignalHandlers(true);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to register adapter signal handlers: 0x%x", st);
DSBLOG_WARN("Failed to register adapter signal handlers: %s", QCC_StatusText(st));
goto Leave;
}
......@@ -113,7 +113,7 @@ bridge::DeviceSystemBridge::Shutdown()
st = ShutdownInternal();
if (st != ER_OK)
{
DSBLOG_WARN("failed to shutdown internal: 0x%x", st);
DSBLOG_WARN("failed to shutdown internal: %s", QCC_StatusText(st));
return st;
}
......@@ -234,7 +234,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister)
int ret = m_adapter->RegisterSignalListener((*itr)->GetName(), m_adapterSignalListener, NULL, handle);
if (ret != 0)
{
DSBLOG_WARN("failed to register signal listener on adapter: 0x%x", st);
DSBLOG_WARN("failed to register signal listener on adapter: %s", QCC_StatusText(st));
if (st == ER_OK)
ret = st;
}
......@@ -253,7 +253,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister)
int ret = m_adapter->UnregisterSignalListener(*begin);
if (ret != 0)
{
DSBLOG_WARN("failed to unregister signal listener on adapter: 0x%x", st);
DSBLOG_WARN("failed to unregister signal listener on adapter: %s", QCC_StatusText(st));
if (st == ER_OK)
st = ER_FAIL;
}
......@@ -296,7 +296,7 @@ bridge::DeviceSystemBridge::UpdateDevice(shared_ptr<IAdapterDevice> const& dev,
{
m_deviceList.erase(itr);
if ((st = itr->second->Shutdown()) != ER_OK)
DSBLOG_WARN("failed to shutdown BridgeDevice: 0x%x", st);
DSBLOG_WARN("failed to shutdown BridgeDevice: %s", QCC_StatusText(st));
}
return st;
......
......@@ -92,14 +92,14 @@ ConfigManager::ConnectToAllJoyn()
st = m_busAttachment->Connect();
if (st != ER_OK)
{
DSBLOG_WARN("Failed to connect to AllJoyn bus: %d", st);
DSBLOG_WARN("Failed to connect to AllJoyn bus: %s", QCC_StatusText(st));
return st;
}
st = m_busAttachment->RequestName(m_serviceName.c_str(), DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to get name %s on AllJoyn bus: %d", m_serviceName.c_str(), st);
DSBLOG_WARN("Failed to get name %s on AllJoyn bus: %s", m_serviceName.c_str(), QCC_StatusText(st));
return st;
}
......@@ -107,14 +107,14 @@ ConfigManager::ConnectToAllJoyn()
st = m_busAttachment->BindSessionPort(m_sessionPort, sessionOpts, *this);
if (!st)
{
DSBLOG_WARN("Failed to bind session port: %d", st);
DSBLOG_WARN("Failed to bind session port: %s", QCC_StatusText(st));
return st;
}
st = m_busAttachment->AdvertiseName(m_serviceName.c_str(), sessionOpts.transports);
if (!st)
{
DSBLOG_WARN("Failed to advertise service name: %d", st);
DSBLOG_WARN("Failed to advertise service name: %s", QCC_StatusText(st));
return st;
}
......@@ -159,7 +159,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*)
QStatus st = m_busAttachment->SetSessionListener(id, this);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to set session listener: %d", st);
DSBLOG_WARN("Failed to set session listener: %s", QCC_StatusText(st));
return;
}
......@@ -167,7 +167,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*)
st = m_busAttachment->SetLinkTimeout(id, timeout);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to set session link timeout to %" PRIu32 ": %d", timeout, st);
DSBLOG_WARN("Failed to set session link timeout to %" PRIu32 ": %s", timeout, QCC_StatusText(st));
return;
}
}
......
......@@ -46,7 +46,7 @@ bridge::DeviceMain::Initialize()
st = AddInterface(*m_interfaceDescription);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to add interface to bus object: %d", st);
DSBLOG_WARN("Failed to add interface to bus object: %s", QCC_StatusText(st));
return st;
}
......@@ -62,7 +62,7 @@ bridge::DeviceMain::Initialize()
st = AddMethodHandler(member, static_cast<ajn::MessageReceiver::MethodHandler>(&DeviceMain::AJMethod));
if (st != ER_OK)
{
DSBLOG_WARN("Failed to add method handler: %d", st);
DSBLOG_WARN("Failed to add method handler: %s", QCC_StatusText(st));
return st;
}
}
......@@ -70,7 +70,7 @@ bridge::DeviceMain::Initialize()
st = m_parent.GetBusAttachment().RegisterBusObject(*this);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to register bus object: %d", st);
DSBLOG_WARN("Failed to register bus object: %s", QCC_StatusText(st));
return st;
}
......
......@@ -52,7 +52,7 @@ int main(int /*argc*/, char* /*argv*/ [])
st = bridge->Initialize();
if (st != ER_OK)
{
DSBLOG_ERROR("failed to initialize bridge: 0x%x", st);
DSBLOG_ERROR("failed to initialize bridge: %s", QCC_StatusText(st));
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment