nexus: Refactor some of the create/remove network path and add code for
retrieving network lists from supplicant
nexus: Rework properties
nexus: Implement wifi network enable/disable and add some error checking
nexus: Add some TODOs
nexus: Whitespace cleanup
nexus: Add bindings between controllers and network interfaces
nexus: Add properties for InterfaceConfig
nexus: Fix a few conversion bugs in InterfaceConfig
Signed-off-by: San Mehat <san@google.com>
diff --git a/nexus/OpenVpnController.cpp b/nexus/OpenVpnController.cpp
index 1934024..4c144a4 100644
--- a/nexus/OpenVpnController.cpp
+++ b/nexus/OpenVpnController.cpp
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -24,13 +25,13 @@
#include <sysutils/ServiceManager.h>
#include "OpenVpnController.h"
+#include "PropertyManager.h"
#define DAEMON_PROP_NAME "vpn.openvpn.status"
-
#define DAEMON_CONFIG_FILE "/data/misc/openvpn/openvpn.conf"
-OpenVpnController::OpenVpnController() :
- VpnController() {
+OpenVpnController::OpenVpnController(PropertyManager *propmngr) :
+ VpnController(propmngr) {
mServiceManager = new ServiceManager();
}
@@ -49,8 +50,8 @@
int OpenVpnController::enable() {
char svc[PROPERTY_VALUE_MAX];
char tmp[64];
-
- if (!getProperty("vpn.gateway", tmp, sizeof(tmp))) {
+
+ if (!mPropMngr->get("vpn.gateway", tmp, sizeof(tmp))) {
LOGE("Error reading property 'vpn.gateway' (%s)", strerror(errno));
return -1;
}