projects
/
framework
/
connectivity
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
technology: return already enabled when tethering is enabled
[framework/connectivity/connman.git]
/
scripts
/
libppp-plugin.c
diff --git
a/scripts/libppp-plugin.c
b/scripts/libppp-plugin.c
index
ba79db0
..
e77b8cc
100644
(file)
--- a/
scripts/libppp-plugin.c
+++ b/
scripts/libppp-plugin.c
@@
-2,7
+2,7
@@
*
* Connection Manager
*
*
* Connection Manager
*
- * Copyright (C) 201
1
Intel Corporation. All rights reserved.
+ * Copyright (C) 201
2
Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@
-45,6
+45,7
@@
static char *interface;
static char *path;
static DBusConnection *connection;
static char *path;
static DBusConnection *connection;
+static int prev_phase;
char pppd_version[] = VERSION;
char pppd_version[] = VERSION;
@@
-238,11
+239,18
@@
static void ppp_phase_change(void *data, int arg)
{
const char *reason = "disconnect";
DBusMessage *msg;
{
const char *reason = "disconnect";
DBusMessage *msg;
+ int send_msg = 0;
if (connection == NULL)
return;
if (connection == NULL)
return;
- if (arg == PHASE_DEAD || arg == PHASE_DISCONNECT) {
+ if (prev_phase == PHASE_AUTHENTICATE &&
+ arg == PHASE_TERMINATE) {
+ reason = "auth failed";
+ send_msg = 1;
+ }
+
+ if (send_msg > 0 || arg == PHASE_DEAD || arg == PHASE_DISCONNECT) {
msg = dbus_message_new_method_call(busname, path,
interface, "notify");
if (msg == NULL)
msg = dbus_message_new_method_call(busname, path,
interface, "notify");
if (msg == NULL)
@@
-259,6
+267,8
@@
static void ppp_phase_change(void *data, int arg)
dbus_message_unref(msg);
}
dbus_message_unref(msg);
}
+
+ prev_phase = arg;
}
int plugin_init(void)
}
int plugin_init(void)