[network-manager-vpnc/danw/cleanup-bgo746693] all: fix indenting
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc/danw/cleanup-bgo746693] all: fix indenting
- Date: Wed, 25 Mar 2015 13:09:42 +0000 (UTC)
commit 3023c24abce6f5026cf7b1f9ef9179085ae04a35
Author: Jiří Klimeš <jklimes redhat com>
Date: Wed Mar 25 14:08:27 2015 +0100
all: fix indenting
properties/nm-vpnc.c | 26 +++++++++++++-------------
src/nm-vpnc-service-vpnc-helper.c | 30 +++++++++++++++---------------
src/nm-vpnc-service.c | 34 ++++++++++++++++++----------------
src/utils.c | 4 ++--
4 files changed, 48 insertions(+), 46 deletions(-)
---
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 3968d68..30b07af 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -50,14 +50,14 @@
#define VPNC_PLUGIN_NAME _("Cisco Compatible VPN (vpnc)")
#define VPNC_PLUGIN_DESC _("Compatible with various Cisco, Juniper, Netscreen, and Sonicwall IPsec-based
VPN gateways.")
-#define VPNC_PLUGIN_SERVICE NM_DBUS_SERVICE_VPNC
+#define VPNC_PLUGIN_SERVICE NM_DBUS_SERVICE_VPNC
#define ENC_TYPE_SECURE 0
#define ENC_TYPE_WEAK 1
#define ENC_TYPE_NONE 2
#define PW_TYPE_SAVE 0
-#define PW_TYPE_ASK 1
+#define PW_TYPE_ASK 1
#define PW_TYPE_UNUSED 2
#define NM_VPNC_LOCAL_PORT_DEFAULT 500
@@ -67,16 +67,16 @@
static void vpnc_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class);
G_DEFINE_TYPE_EXTENDED (VpncPluginUi, vpnc_plugin_ui, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_INTERFACE,
-
vpnc_plugin_ui_interface_init))
+ G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_INTERFACE,
+ vpnc_plugin_ui_interface_init))
/************** UI widget class **************/
static void vpnc_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class);
G_DEFINE_TYPE_EXTENDED (VpncPluginUiWidget, vpnc_plugin_ui_widget, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE,
-
vpnc_plugin_ui_widget_interface_init))
+ G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE,
+ vpnc_plugin_ui_widget_interface_init))
#define VPNC_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VPNC_TYPE_PLUGIN_UI_WIDGET,
VpncPluginUiWidgetPrivate))
@@ -1864,7 +1864,7 @@ ui_factory (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **er
static void
get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+ GValue *value, GParamSpec *pspec)
{
switch (prop_id) {
case NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME:
@@ -1890,16 +1890,16 @@ vpnc_plugin_ui_class_init (VpncPluginUiClass *req_class)
object_class->get_property = get_property;
g_object_class_override_property (object_class,
-
NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME,
- NM_VPN_PLUGIN_UI_INTERFACE_NAME);
+ NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME,
+ NM_VPN_PLUGIN_UI_INTERFACE_NAME);
g_object_class_override_property (object_class,
-
NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC,
- NM_VPN_PLUGIN_UI_INTERFACE_DESC);
+ NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC,
+ NM_VPN_PLUGIN_UI_INTERFACE_DESC);
g_object_class_override_property (object_class,
-
NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE,
- NM_VPN_PLUGIN_UI_INTERFACE_SERVICE);
+ NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE,
+ NM_VPN_PLUGIN_UI_INTERFACE_SERVICE);
}
static void
diff --git a/src/nm-vpnc-service-vpnc-helper.c b/src/nm-vpnc-service-vpnc-helper.c
index 39be98f..f3d8788 100644
--- a/src/nm-vpnc-service-vpnc-helper.c
+++ b/src/nm-vpnc-service-vpnc-helper.c
@@ -50,14 +50,14 @@ helper_failed (DBusGConnection *connection, const char *reason)
g_warning ("nm-nvpnc-service-vpnc-helper did not receive a valid %s from vpnc", reason);
proxy = dbus_g_proxy_new_for_name (connection,
- NM_DBUS_SERVICE_VPNC,
- NM_VPN_DBUS_PLUGIN_PATH,
- NM_VPN_DBUS_PLUGIN_INTERFACE);
+ NM_DBUS_SERVICE_VPNC,
+ NM_VPN_DBUS_PLUGIN_PATH,
+ NM_VPN_DBUS_PLUGIN_INTERFACE);
dbus_g_proxy_call (proxy, "SetFailure", &err,
- G_TYPE_STRING, reason,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
+ G_TYPE_STRING, reason,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
if (err) {
g_warning ("Could not send failure information: %s", err->message);
@@ -76,15 +76,15 @@ send_ip4_config (DBusGConnection *connection, GHashTable *config)
GError *err = NULL;
proxy = dbus_g_proxy_new_for_name (connection,
- NM_DBUS_SERVICE_VPNC,
- NM_VPN_DBUS_PLUGIN_PATH,
- NM_VPN_DBUS_PLUGIN_INTERFACE);
+ NM_DBUS_SERVICE_VPNC,
+ NM_VPN_DBUS_PLUGIN_PATH,
+ NM_VPN_DBUS_PLUGIN_INTERFACE);
dbus_g_proxy_call (proxy, "SetIp4Config", &err,
- dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
- config,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
+ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
+ config,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
if (err) {
g_warning ("Could not send IPv4 configuration: %s", err->message);
@@ -148,7 +148,7 @@ bool_to_gvalue (gboolean b)
static GValue *
addr_to_gvalue (const char *str)
{
- struct in_addr temp_addr;
+ struct in_addr temp_addr;
/* Empty */
if (!str || strlen (str) < 1)
@@ -308,7 +308,7 @@ get_routes (void)
* CISCO_BANNER -- banner from server
*
*/
-int
+int
main (int argc, char *argv[])
{
DBusGConnection *connection;
diff --git a/src/nm-vpnc-service.c b/src/nm-vpnc-service.c
index 1f315b3..3c9327b 100644
--- a/src/nm-vpnc-service.c
+++ b/src/nm-vpnc-service.c
@@ -79,10 +79,10 @@ typedef struct {
#define NM_VPNC_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPNC_PLUGIN,
NMVPNCPluginPrivate))
-#define NM_VPNC_HELPER_PATH LIBEXECDIR"/nm-vpnc-service-vpnc-helper"
-#define NM_VPNC_PID_PATH LOCALSTATEDIR"/run/NetworkManager"
-#define NM_VPNC_UDP_ENCAPSULATION_PORT 0 /* random port */
-#define NM_VPNC_LOCAL_PORT_ISAKMP 0 /* random port */
+#define NM_VPNC_HELPER_PATH LIBEXECDIR"/nm-vpnc-service-vpnc-helper"
+#define NM_VPNC_PID_PATH LOCALSTATEDIR"/run/NetworkManager"
+#define NM_VPNC_UDP_ENCAPSULATION_PORT 0 /* random port */
+#define NM_VPNC_LOCAL_PORT_ISAKMP 0 /* random port */
typedef enum {
ITEM_TYPE_UNKNOWN = 0,
@@ -651,9 +651,9 @@ nm_vpnc_start_vpnc_binary (NMVPNCPlugin *plugin, gboolean interactive, GError **
static inline void
write_config_option (int fd, const char *format, ...)
{
- char * string;
- va_list args;
- int x;
+ char *string;
+ va_list args;
+ int x;
va_start (args, format);
string = g_strdup_vprintf (format, args);
@@ -688,8 +688,8 @@ write_one_property (const char *key, const char *value, gpointer user_data)
ValidProperty prop = valid_properties[i];
if (!strcmp (prop.name, (char *) key)) {
- /* Property is ok */
- type = prop.type;
+ /* Property is ok */
+ type = prop.type;
break;
}
}
@@ -699,8 +699,8 @@ write_one_property (const char *key, const char *value, gpointer user_data)
ValidProperty prop = valid_secrets[i];
if (!strcmp (prop.name, (char *) key)) {
- /* Property is ok */
- type = prop.type;
+ /* Property is ok */
+ type = prop.type;
break;
}
}
@@ -803,7 +803,7 @@ nm_vpnc_config_write (gint vpnc_fd,
NM_VPNC_KEY_XAUTH_USER " %s\n",
default_username);
}
-
+
/* Use Cisco UDP by default */
props_natt_mode = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_NAT_TRAVERSAL_MODE);
if (!props_natt_mode || !strlen (props_natt_mode)) {
@@ -1019,7 +1019,7 @@ real_need_secrets (NMVPNPlugin *plugin,
s_vpn = nm_connection_get_setting_vpn (connection);
if (!s_vpn) {
- g_set_error (error,
+ g_set_error (error,
NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s",
@@ -1084,8 +1084,9 @@ NMVPNCPlugin *
nm_vpnc_plugin_new (void)
{
return (NMVPNCPlugin *) g_object_new (NM_TYPE_VPNC_PLUGIN,
- NM_VPN_PLUGIN_DBUS_SERVICE_NAME,
NM_DBUS_SERVICE_VPNC,
- NULL);
+ NM_VPN_PLUGIN_DBUS_SERVICE_NAME,
+ NM_DBUS_SERVICE_VPNC,
+ NULL);
}
static void
@@ -1177,7 +1178,8 @@ main (int argc, char *argv[])
g_option_context_add_main_entries (opt_ctx, options, NULL);
g_option_context_set_summary (opt_ctx,
- _("nm-vpnc-service provides integrated Cisco Legacy IPsec VPN capability to
NetworkManager."));
+ _("nm-vpnc-service provides integrated "
+ "Cisco Legacy IPsec VPN capability to NetworkManager."));
g_option_context_parse (opt_ctx, &argc, &argv, NULL);
g_option_context_free (opt_ctx);
diff --git a/src/utils.c b/src/utils.c
index fd44e2d..6fde9d8 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -33,7 +33,7 @@
* @prompt_fn: function to call when vpnc (or the server) sends a request for
* passwords or more information
* @prompt_fn_data: pointer to pass to @prompt_fn
- *
+ *
* Parses new vpnc output to extract server messages and detect prompts for
* more information. Since vpnc can print variable numbers of bytes at a time,
* not necessarily a complete line or block, this function should be called
@@ -76,7 +76,7 @@ utils_handle_output (GString *output,
* [2011-06-03 11:11:13]
* Password for VPN person 1 1 1 1: (waits for input without newline)
* size = 42, blksz = 16, padding = 6
- *
+ *
* So we can't just listen for '\n\n' or we won't react immediately to
* input prompts or correctly process service messages.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]