|
|
@ -1597,18 +1597,6 @@ TDENetworkConnectionType::TDENetworkConnectionType TDENetworkConnectionManager_B
|
|
|
|
TQ_UINT32 ret;
|
|
|
|
TQ_UINT32 ret;
|
|
|
|
TQT_DBusError error;
|
|
|
|
TQT_DBusError error;
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, dbusPath);
|
|
|
|
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
|
|
|
|
TQT_DBusTQStringDataMap connectionSettingsMap;
|
|
|
|
|
|
|
|
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
|
|
|
|
|
|
|
|
if (ret && error.isValid()) {
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
|
|
|
|
#else // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, dbusPath);
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, dbusPath);
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
@ -1640,7 +1628,6 @@ TDENetworkConnectionType::TDENetworkConnectionType TDENetworkConnectionManager_B
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Parse settings to find connection type
|
|
|
|
// Parse settings to find connection type
|
|
|
|
TQT_DBusTQStringDataMap::const_iterator it2;
|
|
|
|
TQT_DBusTQStringDataMap::const_iterator it2;
|
|
|
@ -1939,18 +1926,6 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
|
|
|
|
printf("[network-manager comm debug] %s\n", (*it).data()); fflush(stdout);
|
|
|
|
printf("[network-manager comm debug] %s\n", (*it).data()); fflush(stdout);
|
|
|
|
#endif // DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
#endif // DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, (*it));
|
|
|
|
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
|
|
|
|
TQT_DBusTQStringDataMap connectionSettingsMap;
|
|
|
|
|
|
|
|
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
|
|
|
|
|
|
|
|
if (ret && error.isValid()) {
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
|
|
|
|
#else // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, (*it));
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, (*it));
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
@ -1983,7 +1958,6 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
|
|
|
|
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
|
|
|
@ -3079,17 +3053,6 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
|
|
|
|
TQT_DBusTQStringDataMap connectionSecretsMap(TQT_DBusData::String);
|
|
|
|
TQT_DBusTQStringDataMap connectionSecretsMap(TQT_DBusData::String);
|
|
|
|
ret = d->m_networkManagerSettings->GetConnectionByUuid(uuid, existingConnection, error);
|
|
|
|
ret = d->m_networkManagerSettings->GetConnectionByUuid(uuid, existingConnection, error);
|
|
|
|
if (ret) {
|
|
|
|
if (ret) {
|
|
|
|
#ifndef USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
|
|
|
|
ret = connectionSettings.GetSecrets(group, connectionSecretsMap, error);
|
|
|
|
|
|
|
|
if (ret && error.isValid()) {
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
|
|
|
|
#else // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection secrets from the path specified
|
|
|
|
// Obtain connection secrets from the path specified
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
@ -3121,7 +3084,6 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
|
|
|
|
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
|
|
|
|
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
|
|
|
@ -3296,17 +3258,6 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
existing = false;
|
|
|
|
existing = false;
|
|
|
|
ret = d->m_networkManagerSettings->GetConnectionByUuid(connection->UUID, existingConnection, error);
|
|
|
|
ret = d->m_networkManagerSettings->GetConnectionByUuid(connection->UUID, existingConnection, error);
|
|
|
|
if (ret) {
|
|
|
|
if (ret) {
|
|
|
|
#ifndef USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
|
|
|
|
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
|
|
|
|
|
|
|
|
if (ret && error.isValid()) {
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
|
|
|
|
#else // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
// Obtain connection settings from the path specified
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
|
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
|
|
|
@ -3339,7 +3290,6 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // USE_ASYNC_DBUS_CALLS
|
|
|
|
|
|
|
|
existing = true;
|
|
|
|
existing = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|