[network-manager-applet: 7/10] applet/trivial: reorder code in "src/applet-vpn-request.c"
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet: 7/10] applet/trivial: reorder code in "src/applet-vpn-request.c"
- Date: Thu, 23 Nov 2017 14:02:34 +0000 (UTC)
commit 1d7740a45d24f2b042749a73baf6db129226ed44
Author: Thomas Haller <thaller redhat com>
Date: Mon Nov 20 16:48:04 2017 +0100
applet/trivial: reorder code in "src/applet-vpn-request.c"
No changes.
src/applet-vpn-request.c | 46 ++++++++++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 16 deletions(-)
---
diff --git a/src/applet-vpn-request.c b/src/applet-vpn-request.c
index 1bbe1d3..085a8ef 100644
--- a/src/applet-vpn-request.c
+++ b/src/applet-vpn-request.c
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright 2004 - 2014 Red Hat, Inc.
+ * Copyright 2004 - 2017 Red Hat, Inc.
*/
#include "nm-default.h"
@@ -32,6 +32,8 @@
#include <unistd.h>
#include <errno.h>
+/*****************************************************************************/
+
typedef struct {
char *uuid;
char *id;
@@ -48,16 +50,24 @@ typedef struct {
guint channel_eventid;
} RequestData;
+typedef struct {
+ SecretsRequest req;
+ RequestData *req_data;
+} VpnSecretsInfo;
+
/*****************************************************************************/
static void request_data_free (RequestData *req_data);
/*****************************************************************************/
-typedef struct {
- SecretsRequest req;
- RequestData *req_data;
-} VpnSecretsInfo;
+size_t
+applet_vpn_request_get_secrets_size (void)
+{
+ return sizeof (VpnSecretsInfo);
+}
+
+/*****************************************************************************/
static void
child_finished_cb (GPid pid, gint status, gpointer user_data)
@@ -105,6 +115,8 @@ child_finished_cb (GPid pid, gint status, gpointer user_data)
applet_secrets_request_free (req);
}
+/*****************************************************************************/
+
static gboolean
child_stdout_data_cb (GIOChannel *source, GIOCondition condition, gpointer user_data)
{
@@ -136,17 +148,7 @@ child_stdout_data_cb (GIOChannel *source, GIOCondition condition, gpointer user_
return TRUE;
}
-static void
-free_vpn_secrets_info (SecretsRequest *req)
-{
- request_data_free (((VpnSecretsInfo *) req)->req_data);
-}
-
-size_t
-applet_vpn_request_get_secrets_size (void)
-{
- return sizeof (VpnSecretsInfo);
-}
+/*****************************************************************************/
typedef struct {
int fd;
@@ -233,6 +235,8 @@ write_connection_to_child (int fd, NMConnection *connection, GError **error)
return TRUE;
}
+/*****************************************************************************/
+
static void
vpn_child_setup (gpointer user_data)
{
@@ -320,6 +324,14 @@ auth_dialog_spawn (const char *con_id,
return TRUE;
}
+/*****************************************************************************/
+
+static void
+free_vpn_secrets_info (SecretsRequest *req)
+{
+ request_data_free (((VpnSecretsInfo *) req)->req_data);
+}
+
gboolean
applet_vpn_request_get_secrets (SecretsRequest *req, GError **error)
{
@@ -389,6 +401,8 @@ applet_vpn_request_get_secrets (SecretsRequest *req, GError **error)
return write_connection_to_child (req_data->child_stdin, req->connection, error);
}
+/*****************************************************************************/
+
static gboolean
ensure_killed (gpointer data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]