[users] Correct DBus return from hostnamed calls
This commit is contained in:
parent
094c213baa
commit
f7e8488edf
@ -99,7 +99,7 @@ setSystemdHostname( const QString& hostname )
|
||||
bool success = true;
|
||||
// Static, writes /etc/hostname
|
||||
{
|
||||
QDBusReply< uint > r = hostnamed.call( "SetStaticHostname", hostname, false );
|
||||
QDBusReply< void > r = hostnamed.call( "SetStaticHostname", hostname, false );
|
||||
if ( !r.isValid() )
|
||||
{
|
||||
cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetStaticHostname." << r.error();
|
||||
@ -108,7 +108,7 @@ setSystemdHostname( const QString& hostname )
|
||||
}
|
||||
// Dynamic, updates kernel
|
||||
{
|
||||
QDBusReply< uint > r = hostnamed.call( "SetHostname", hostname, false );
|
||||
QDBusReply< void > r = hostnamed.call( "SetHostname", hostname, false );
|
||||
if ( !r.isValid() )
|
||||
{
|
||||
cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetHostname." << r.error();
|
||||
|
Loading…
Reference in New Issue
Block a user