Skip to content

Commit

Permalink
[ssu] Handle ofono dbus errors. Fixes JB#36623
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Oct 14, 2016
1 parent 55f003e commit 8303090
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libssu/ssudeviceinfo.cpp
Expand Up @@ -9,7 +9,7 @@
#include <QTextStream>
#include <QDir>

#include <QDBusMessage>
#include <QDBusReply>
#include <QDBusConnection>
#include <QDBusArgument>

Expand Down Expand Up @@ -262,13 +262,12 @@ ofonoGetImeis()
{
QStringList result;

QDBusMessage reply = QDBusConnection::systemBus().call(
QDBusReply<QStringList> reply = QDBusConnection::systemBus().call(
QDBusMessage::createMethodCall("org.ofono", "/",
"org.nemomobile.ofono.ModemManager", "GetIMEI"));

QList<QVariant> arguments = reply.arguments();
if (arguments.count() > 0) {
result = arguments.at(0).toStringList();
if (reply.isValid()) {
result = reply.value();
}

return result;
Expand Down

0 comments on commit 8303090

Please sign in to comment.