[asterisk-commits] file: branch file/res_xmpp r368713 - in /team/file/res_xmpp: include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 8 16:03:21 CDT 2012


Author: file
Date: Fri Jun  8 16:03:17 2012
New Revision: 368713

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368713
Log:
Whitespace cleanup.

Modified:
    team/file/res_xmpp/include/asterisk/xmpp.h
    team/file/res_xmpp/res/res_xmpp.c

Modified: team/file/res_xmpp/include/asterisk/xmpp.h
URL: http://svnview.digium.com/svn/asterisk/team/file/res_xmpp/include/asterisk/xmpp.h?view=diff&rev=368713&r1=368712&r2=368713
==============================================================================
--- team/file/res_xmpp/include/asterisk/xmpp.h (original)
+++ team/file/res_xmpp/include/asterisk/xmpp.h Fri Jun  8 16:03:17 2012
@@ -48,14 +48,14 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/pbx.h"
 
-/* 
- * As per RFC 3920 - section 3.1, the maximum length for a full Jabber ID 
+/*
+ * As per RFC 3920 - section 3.1, the maximum length for a full Jabber ID
  * is 3071 bytes.
  * The ABNF syntax for jid :
  * jid = [node "@" ] domain [ "/" resource ]
  * Each allowable portion of a JID (node identifier, domain identifier,
  * and resource identifier) MUST NOT be more than 1023 bytes in length,
- * resulting in a maximum total size (including the '@' and '/' separators) 
+ * resulting in a maximum total size (including the '@' and '/' separators)
  * of 3071 bytes.
  */
 #define XMPP_MAX_JIDLEN 3071
@@ -68,83 +68,83 @@
 
 /*! \brief Client connection states */
 enum xmpp_state {
-	XMPP_STATE_DISCONNECTING,   /*!< Client is disconnecting */
-	XMPP_STATE_DISCONNECTED,    /*!< Client is disconnected */
-	XMPP_STATE_CONNECTING,      /*!< Client is connecting */
-	XMPP_STATE_REQUEST_TLS,     /*!< Client should request TLS */
-	XMPP_STATE_REQUESTED_TLS,   /*!< Client has requested TLS */
-	XMPP_STATE_AUTHENTICATE,    /*!< Client needs to authenticate */
-	XMPP_STATE_AUTHENTICATING,  /*!< Client is authenticating */
+        XMPP_STATE_DISCONNECTING,   /*!< Client is disconnecting */
+        XMPP_STATE_DISCONNECTED,    /*!< Client is disconnected */
+        XMPP_STATE_CONNECTING,      /*!< Client is connecting */
+        XMPP_STATE_REQUEST_TLS,     /*!< Client should request TLS */
+        XMPP_STATE_REQUESTED_TLS,   /*!< Client has requested TLS */
+        XMPP_STATE_AUTHENTICATE,    /*!< Client needs to authenticate */
+        XMPP_STATE_AUTHENTICATING,  /*!< Client is authenticating */
         XMPP_STATE_ROSTER,          /*!< Client is currently getting the roster */
-	XMPP_STATE_CONNECTED,       /*!< Client is fully connected */
+        XMPP_STATE_CONNECTED,       /*!< Client is fully connected */
 };
 
 /*! \brief Resource capabilities */
 struct ast_xmpp_capabilities {
-	char node[200];        /*!< Node string from the capabilities stanza in presence notification */
-	char version[50];      /*!< Version string from the capabilities stanza in presence notification */
-	unsigned int jingle:1; /*!< Set if the resource supports Jingle */
-	unsigned int google:1; /*!< Set if the resource supports Google Talk */
+        char node[200];        /*!< Node string from the capabilities stanza in presence notification */
+        char version[50];      /*!< Version string from the capabilities stanza in presence notification */
+        unsigned int jingle:1; /*!< Set if the resource supports Jingle */
+        unsigned int google:1; /*!< Set if the resource supports Google Talk */
 };
 
 /*! \brief XMPP Resource */
 struct ast_xmpp_resource {
-	char resource[XMPP_MAX_RESJIDLEN]; /*!< JID of the resource */
-	int status;                        /*!< Current status of the resource */
-	char *description;                 /*!< Description of the resource */
-	int priority;                      /*!< Priority, used for deciding what resource to use */
-	struct ast_xmpp_capabilities caps; /*!< Capabilities of the resource */
+        char resource[XMPP_MAX_RESJIDLEN]; /*!< JID of the resource */
+        int status;                        /*!< Current status of the resource */
+        char *description;                 /*!< Description of the resource */
+        int priority;                      /*!< Priority, used for deciding what resource to use */
+        struct ast_xmpp_capabilities caps; /*!< Capabilities of the resource */
 };
 
 /*! \brief XMPP Message */
 struct ast_xmpp_message {
-	char *from;                            /*!< Who the message is from */
-	char *message;                         /*!< Message contents */
-	char id[25];                           /*!< Identifier for the message */
-	struct timeval arrived;                /*!< When the message arrived */
-	AST_LIST_ENTRY(ast_xmpp_message) list; /*!< Linked list information */
+        char *from;                            /*!< Who the message is from */
+        char *message;                         /*!< Message contents */
+        char id[25];                           /*!< Identifier for the message */
+        struct timeval arrived;                /*!< When the message arrived */
+        AST_LIST_ENTRY(ast_xmpp_message) list; /*!< Linked list information */
 };
 
 /*! \brief XMPP Buddy */
 struct ast_xmpp_buddy {
-	char id[XMPP_MAX_JIDLEN];        /*!< JID of the buddy */
-	struct ao2_container *resources; /*!< Resources for the buddy */
-	unsigned int subscribe:1;        /*!< Need to subscribe to get their status */
+        char id[XMPP_MAX_JIDLEN];        /*!< JID of the buddy */
+        struct ao2_container *resources; /*!< Resources for the buddy */
+        unsigned int subscribe:1;        /*!< Need to subscribe to get their status */
 };
 
 /*! \brief XMPP Client Connection */
 struct ast_xmpp_client {
-	AST_DECLARE_STRING_FIELDS(
-		AST_STRING_FIELD(name);        /*!< Name of the client connection */
+        AST_DECLARE_STRING_FIELDS(
+                AST_STRING_FIELD(name);        /*!< Name of the client connection */
                 AST_STRING_FIELD(user);        /*!< Username to use for authentication */
-		AST_STRING_FIELD(password);    /*!< Password to use for authentication */
+                AST_STRING_FIELD(password);    /*!< Password to use for authentication */
                 AST_STRING_FIELD(server);      /*!< Server hostname */
-		AST_STRING_FIELD(statusmsg);   /*!< Status message for presence */
+                AST_STRING_FIELD(statusmsg);   /*!< Status message for presence */
                 AST_STRING_FIELD(pubsubnode);  /*!< Pubsub node */
-		);
-	char mid[6]; /* Message ID */
-	char context[AST_MAX_CONTEXT]; /*!< Context for incoming messages */
-	iksid *jid;
-	iksparser *parser;
-	iksfilter *filter;
-	ikstack *stack;
+                );
+        char mid[6]; /* Message ID */
+        char context[AST_MAX_CONTEXT]; /*!< Context for incoming messages */
+        iksid *jid;
+        iksparser *parser;
+        iksfilter *filter;
+        ikstack *stack;
 #ifdef HAVE_OPENSSL
-	SSL_CTX *ssl_context;
-	SSL *ssl_session;
-	const SSL_METHOD *ssl_method;
-	unsigned int stream_flags;
+        SSL_CTX *ssl_context;
+        SSL *ssl_session;
+        const SSL_METHOD *ssl_method;
+        unsigned int stream_flags;
 #endif /* HAVE_OPENSSL */
-	enum xmpp_state state;
-	int port;
-	int timeout;
-	int message_timeout;
-	struct ast_flags flags;
-	struct ao2_container *buddies;
-	AST_LIST_HEAD(, ast_xmpp_message) messages;
-	pthread_t thread;
-	int priority;
-	enum ikshowtype status;
-	unsigned int destroy:1;
+        enum xmpp_state state;
+        int port;
+        int timeout;
+        int message_timeout;
+        struct ast_flags flags;
+        struct ao2_container *buddies;
+        AST_LIST_HEAD(, ast_xmpp_message) messages;
+        pthread_t thread;
+        int priority;
+        enum ikshowtype status;
+        unsigned int destroy:1;
 };
 
 /*!

Modified: team/file/res_xmpp/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/file/res_xmpp/res/res_xmpp.c?view=diff&rev=368713&r1=368712&r2=368713
==============================================================================
--- team/file/res_xmpp/res/res_xmpp.c (original)
+++ team/file/res_xmpp/res/res_xmpp.c Fri Jun  8 16:03:17 2012
@@ -2660,7 +2660,7 @@
 			int res;
 
 			ast_xmpp_client_lock(client);
-			
+
 			res = ast_msg_set_to(msg, "xmpp:%s", client->user);
 			res |= ast_msg_set_from(msg, "xmpp:%s", message->from);
 			res |= ast_msg_set_body(msg, "%s", message->message);
@@ -3487,16 +3487,16 @@
  */
 static iks* xmpp_pubsub_build_node_request(struct ast_xmpp_client *client, const char *collection)
 {
-        iks *request = xmpp_pubsub_iq_create(client, "get"), *query;
-
-        query = iks_insert(request, "query");
-        iks_insert_attrib(query, "xmlns", "http://jabber.org/protocol/disco#items");
-
-        if (collection) {
-                iks_insert_attrib(query, "node", collection);
-        }
-
-        return request;
+	iks *request = xmpp_pubsub_iq_create(client, "get"), *query;
+
+	query = iks_insert(request, "query");
+	iks_insert_attrib(query, "xmlns", "http://jabber.org/protocol/disco#items");
+
+	if (collection) {
+		iks_insert_attrib(query, "node", collection);
+	}
+
+	return request;
 }
 
 /*!
@@ -3508,23 +3508,23 @@
 static int xmpp_pubsub_receive_node_list(void *data, ikspak* pak)
 {
 	struct ast_xmpp_client *client = data;
-        iks *item = NULL;
-
-        if (iks_has_children(pak->query)) {
-                item = iks_first_tag(pak->query);
-                ast_verbose("Connection %s: %s\nNode name: %s\n", client->name, client->jid->partial,
+	iks *item = NULL;
+
+	if (iks_has_children(pak->query)) {
+		item = iks_first_tag(pak->query);
+		ast_verbose("Connection %s: %s\nNode name: %s\n", client->name, client->jid->partial,
 			    iks_find_attrib(item, "node"));
-                while ((item = iks_next_tag(item))) {
-                        ast_verbose("Node name: %s\n", iks_find_attrib(item, "node"));
-                }
-        }
-
-        if (item) {
-                iks_delete(item);
-        }
-
-
-        return IKS_FILTER_EAT;
+		while ((item = iks_next_tag(item))) {
+			ast_verbose("Node name: %s\n", iks_find_attrib(item, "node"));
+		}
+	}
+
+	if (item) {
+		iks_delete(item);
+	}
+
+
+	return IKS_FILTER_EAT;
 }
 
 /*!
@@ -3535,13 +3535,13 @@
 */
 static void xmpp_pubsub_request_nodes(struct ast_xmpp_client *client, const char *collection)
 {
-        iks *request = xmpp_pubsub_build_node_request(client, collection);
-
-        iks_filter_add_rule(client->filter, xmpp_pubsub_receive_node_list, client, IKS_RULE_TYPE,
+	iks *request = xmpp_pubsub_build_node_request(client, collection);
+
+	iks_filter_add_rule(client->filter, xmpp_pubsub_receive_node_list, client, IKS_RULE_TYPE,
 			    IKS_PAK_IQ, IKS_RULE_SUBTYPE, IKS_TYPE_RESULT, IKS_RULE_ID, client->mid,
 			    IKS_RULE_DONE);
-        ast_xmpp_client_send(client, request);
-        iks_delete(request);
+	ast_xmpp_client_send(client, request);
+	iks_delete(request);
 
 }
 
@@ -3590,7 +3590,7 @@
 	xmpp_pubsub_request_nodes(client, collection);
 
 	ao2_ref(client, -1);
-	
+
 	return CLI_SUCCESS;
 }
 
@@ -3603,33 +3603,33 @@
 static int xmpp_pubsub_delete_node_list(void *data, ikspak* pak)
 {
 	struct ast_xmpp_client *client = data;
-        iks *item = NULL;
-
-        if (iks_has_children(pak->query)) {
-                item = iks_first_tag(pak->query);
-                ast_log(LOG_WARNING, "Connection: %s  Node name: %s\n", client->jid->partial,
+	iks *item = NULL;
+
+	if (iks_has_children(pak->query)) {
+		item = iks_first_tag(pak->query);
+		ast_log(LOG_WARNING, "Connection: %s  Node name: %s\n", client->jid->partial,
 			iks_find_attrib(item, "node"));
-                while ((item = iks_next_tag(item))) {
-                        xmpp_pubsub_delete_node(client, iks_find_attrib(item, "node"));
-                }
-        }
-
-        if (item) {
-                iks_delete(item);
-        }
-
-        return IKS_FILTER_EAT;
+		while ((item = iks_next_tag(item))) {
+			xmpp_pubsub_delete_node(client, iks_find_attrib(item, "node"));
+		}
+	}
+
+	if (item) {
+		iks_delete(item);
+	}
+
+	return IKS_FILTER_EAT;
 }
 
 static void xmpp_pubsub_purge_nodes(struct ast_xmpp_client *client, const char* collection_name)
 {
-        iks *request = xmpp_pubsub_build_node_request(client, collection_name);
-        ast_xmpp_client_send(client, request);
-        iks_filter_add_rule(client->filter, xmpp_pubsub_delete_node_list, client, IKS_RULE_TYPE,
+	iks *request = xmpp_pubsub_build_node_request(client, collection_name);
+	ast_xmpp_client_send(client, request);
+	iks_filter_add_rule(client->filter, xmpp_pubsub_delete_node_list, client, IKS_RULE_TYPE,
 			    IKS_PAK_IQ, IKS_RULE_SUBTYPE, IKS_TYPE_RESULT, IKS_RULE_ID, client->mid,
 			    IKS_RULE_DONE);
-        ast_xmpp_client_send(client, request);
-        iks_delete(request);
+	ast_xmpp_client_send(client, request);
+	iks_delete(request);
 }
 
 /*!
@@ -3643,39 +3643,39 @@
 					 ast_cli_args *a)
 {
 	struct ast_xmpp_client *client;
-        const char *name;
-
-        switch (cmd) {
+	const char *name;
+
+	switch (cmd) {
 	case CLI_INIT:
 		e->command = "jabber purge nodes";
-                        e->usage =
-                                        "Usage: jabber purge nodes <connection> <node>\n"
-                                        "       Purges nodes on PubSub server\n"
+			e->usage =
+					"Usage: jabber purge nodes <connection> <node>\n"
+					"       Purges nodes on PubSub server\n"
 				"       as configured in jabber.conf.\n";
-                        return NULL;
+			return NULL;
 	case CLI_GENERATE:
 		return NULL;
-        }
-
-        if (a->argc != 5) {
-                return CLI_SHOWUSAGE;
-        }
-        name = a->argv[3];
+	}
+
+	if (a->argc != 5) {
+		return CLI_SHOWUSAGE;
+	}
+	name = a->argv[3];
 
 	if (!(client = ao2_find(clients, name, OBJ_KEY))) {
-                ast_cli(a->fd, "Unable to find client '%s'!\n", name);
-                return CLI_FAILURE;
-        }
-
-        if (ast_test_flag(&pubsubflags, XMPP_XEP0248)) {
-                xmpp_pubsub_purge_nodes(client, a->argv[4]);
-        } else {
-                xmpp_pubsub_delete_node(client, a->argv[4]);
-        }
+		ast_cli(a->fd, "Unable to find client '%s'!\n", name);
+		return CLI_FAILURE;
+	}
+
+	if (ast_test_flag(&pubsubflags, XMPP_XEP0248)) {
+		xmpp_pubsub_purge_nodes(client, a->argv[4]);
+	} else {
+		xmpp_pubsub_delete_node(client, a->argv[4]);
+	}
 
 	ao2_ref(client, -1);
 
-        return CLI_SUCCESS;
+	return CLI_SUCCESS;
 }
 
 /*!
@@ -3689,35 +3689,35 @@
 					ast_cli_args *a)
 {
 	struct ast_xmpp_client *client;
-        const char *name;
-
-        switch (cmd) {
+	const char *name;
+
+	switch (cmd) {
 	case CLI_INIT:
 		e->command = "jabber delete node";
-                        e->usage =
-                                        "Usage: jabber delete node <connection> <node>\n"
-                                        "       Deletes a node on PubSub server\n"
+			e->usage =
+					"Usage: jabber delete node <connection> <node>\n"
+					"       Deletes a node on PubSub server\n"
 				"       as configured in jabber.conf.\n";
-                        return NULL;
+			return NULL;
 	case CLI_GENERATE:
 		return NULL;
-        }
-
-        if (a->argc != 5) {
-                return CLI_SHOWUSAGE;
-        }
-        name = a->argv[3];
+	}
+
+	if (a->argc != 5) {
+		return CLI_SHOWUSAGE;
+	}
+	name = a->argv[3];
 
 	if (!(client = ao2_find(clients, name, OBJ_KEY))) {
-                ast_cli(a->fd, "Unable to find client '%s'!\n", name);
-                return CLI_FAILURE;
-        }
-
-        xmpp_pubsub_delete_node(client, a->argv[4]);
+		ast_cli(a->fd, "Unable to find client '%s'!\n", name);
+		return CLI_FAILURE;
+	}
+
+	xmpp_pubsub_delete_node(client, a->argv[4]);
 
 	ao2_ref(client, -1);
 
-        return CLI_SUCCESS;
+	return CLI_SUCCESS;
 }
 
 /*!
@@ -3767,10 +3767,10 @@
  */
 static char *xmpp_cli_create_leafnode(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-        struct ast_xmpp_client *client;
-        const char *name, *collection_name, *leaf_name;
-
-        switch (cmd) {
+	struct ast_xmpp_client *client;
+	const char *name, *collection_name, *leaf_name;
+
+	switch (cmd) {
 	case CLI_INIT:
 		e->command = "jabber create leaf";
 		e->usage =
@@ -3780,27 +3780,27 @@
 		return NULL;
 	case CLI_GENERATE:
 		return NULL;
-        }
-
-        if (a->argc != 6) {
-                return CLI_SHOWUSAGE;
-        }
-        name = a->argv[3];
-        collection_name = a->argv[4];
-        leaf_name = a->argv[5];
+	}
+
+	if (a->argc != 6) {
+		return CLI_SHOWUSAGE;
+	}
+	name = a->argv[3];
+	collection_name = a->argv[4];
+	leaf_name = a->argv[5];
 
 	if (!(client = ao2_find(clients, name, OBJ_KEY))) {
-                ast_cli(a->fd, "Unable to find client '%s'!\n", name);
-                return CLI_FAILURE;
-        }
-
-        ast_cli(a->fd, "Creating test PubSub node collection.\n");
-
-        xmpp_pubsub_create_leaf(client, collection_name, leaf_name);
+		ast_cli(a->fd, "Unable to find client '%s'!\n", name);
+		return CLI_FAILURE;
+	}
+
+	ast_cli(a->fd, "Creating test PubSub node collection.\n");
+
+	xmpp_pubsub_create_leaf(client, collection_name, leaf_name);
 
 	ao2_ref(client, -1);
 
-        return CLI_SUCCESS;
+	return CLI_SUCCESS;
 }
 
 /*! \brief Callback function which turns on debugging for a client */
@@ -3830,31 +3830,31 @@
  */
 static char *xmpp_do_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-        switch (cmd) {
-        case CLI_INIT:
-                e->command = "jabber set debug {on|off}";
-                e->usage =
-                        "Usage: jabber set debug {on|off}\n"
-                        "       Enables/disables dumping of XMPP/Jabber packets for debugging purposes.\n";
-                return NULL;
-        case CLI_GENERATE:
-                return NULL;
-        }
-
-        if (a->argc != e->args) {
-                return CLI_SHOWUSAGE;
-        }
-
-        if (!strncasecmp(a->argv[e->args - 1], "on", 2)) {
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "jabber set debug {on|off}";
+		e->usage =
+			"Usage: jabber set debug {on|off}\n"
+			"       Enables/disables dumping of XMPP/Jabber packets for debugging purposes.\n";
+		return NULL;
+	case CLI_GENERATE:
+		return NULL;
+	}
+
+	if (a->argc != e->args) {
+		return CLI_SHOWUSAGE;
+	}
+
+	if (!strncasecmp(a->argv[e->args - 1], "on", 2)) {
 		ao2_callback(clients, OBJ_NODATA | OBJ_MULTIPLE, xmpp_client_enable_debug, NULL);
-                ast_cli(a->fd, "Jabber Debugging Enabled.\n");
-                return CLI_SUCCESS;
-        } else if (!strncasecmp(a->argv[e->args - 1], "off", 3)) {
+		ast_cli(a->fd, "Jabber Debugging Enabled.\n");
+		return CLI_SUCCESS;
+	} else if (!strncasecmp(a->argv[e->args - 1], "off", 3)) {
 		ao2_callback(clients, OBJ_NODATA | OBJ_MULTIPLE, xmpp_client_disable_debug, NULL);
-                ast_cli(a->fd, "Jabber Debugging Disabled.\n");
-                return CLI_SUCCESS;
-        }
-        return CLI_SHOWUSAGE; /* defaults to invalid */
+		ast_cli(a->fd, "Jabber Debugging Disabled.\n");
+		return CLI_SUCCESS;
+	}
+	return CLI_SHOWUSAGE; /* defaults to invalid */
 }
 
 /*!
@@ -3867,18 +3867,18 @@
 	struct ao2_iterator i;
 	struct ast_xmpp_client *client;
 
-        switch (cmd) {
-        case CLI_INIT:
-                e->command = "jabber show connections";
-                e->usage =
-                        "Usage: jabber show connections\n"
-                        "       Shows state of client and component connections\n";
-                return NULL;
-        case CLI_GENERATE:
-                return NULL;
-        }
-
-        ast_cli(a->fd, "Jabber Users and their status:\n");
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "jabber show connections";
+		e->usage =
+			"Usage: jabber show connections\n"
+			"       Shows state of client and component connections\n";
+		return NULL;
+	case CLI_GENERATE:
+		return NULL;
+	}
+
+	ast_cli(a->fd, "Jabber Users and their status:\n");
 
 	i = ao2_iterator_init(clients, 0);
 	while ((client = ao2_iterator_next(&i))) {
@@ -3922,10 +3922,10 @@
 	}
 	ao2_iterator_destroy(&i);
 
-        ast_cli(a->fd, "----\n");
-        ast_cli(a->fd, "   Number of clients: %d\n", ao2_container_count(clients));
-
-        return CLI_SUCCESS;
+	ast_cli(a->fd, "----\n");
+	ast_cli(a->fd, "   Number of clients: %d\n", ao2_container_count(clients));
+
+	return CLI_SUCCESS;
 }
 
 /*!
@@ -3938,18 +3938,18 @@
 	struct ao2_iterator i;
 	struct ast_xmpp_client *client;
 
-        switch (cmd) {
-        case CLI_INIT:
-                e->command = "jabber show buddies";
-                e->usage =
-                        "Usage: jabber show buddies\n"
-                        "       Shows buddy lists of our clients\n";
-                return NULL;
-        case CLI_GENERATE:
-                return NULL;
-        }
-
-        ast_cli(a->fd, "Jabber buddy lists\n");
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "jabber show buddies";
+		e->usage =
+			"Usage: jabber show buddies\n"
+			"       Shows buddy lists of our clients\n";
+		return NULL;
+	case CLI_GENERATE:
+		return NULL;
+	}
+
+	ast_cli(a->fd, "Jabber buddy lists\n");
 
 	i = ao2_iterator_init(clients, 0);
 	while ((client = ao2_iterator_next(&i))) {
@@ -3985,7 +3985,7 @@
 	}
 	ao2_iterator_destroy(&i);
 
-        return CLI_SUCCESS;
+	return CLI_SUCCESS;
 }
 
 static struct ast_cli_entry xmpp_cli[] = {
@@ -4001,27 +4001,27 @@
 
 static int unload_module(void)
 {
-        ast_msg_tech_unregister(&msg_tech);
-        ast_cli_unregister_multiple(xmpp_cli, ARRAY_LEN(xmpp_cli));
-        ast_unregister_application(app_ajisend);
-        ast_unregister_application(app_ajisendgroup);
-        ast_unregister_application(app_ajistatus);
-        ast_unregister_application(app_ajijoin);
-        ast_unregister_application(app_ajileave);
-        ast_manager_unregister("JabberSend");
-        ast_custom_function_unregister(&jabberstatus_function);
-        if (mwi_sub) {
-                ast_event_unsubscribe(mwi_sub);
-        }
-        if (device_state_sub) {
-                ast_event_unsubscribe(device_state_sub);
-        }
-        ast_custom_function_unregister(&jabberreceive_function);
+	ast_msg_tech_unregister(&msg_tech);
+	ast_cli_unregister_multiple(xmpp_cli, ARRAY_LEN(xmpp_cli));
+	ast_unregister_application(app_ajisend);
+	ast_unregister_application(app_ajisendgroup);
+	ast_unregister_application(app_ajistatus);
+	ast_unregister_application(app_ajijoin);
+	ast_unregister_application(app_ajileave);
+	ast_manager_unregister("JabberSend");
+	ast_custom_function_unregister(&jabberstatus_function);
+	if (mwi_sub) {
+		ast_event_unsubscribe(mwi_sub);
+	}
+	if (device_state_sub) {
+		ast_event_unsubscribe(device_state_sub);
+	}
+	ast_custom_function_unregister(&jabberreceive_function);
 
 	ao2_ref(clients, -1);
 
-        ast_cond_destroy(&message_received_condition);
-        ast_mutex_destroy(&messagelock);
+	ast_cond_destroy(&message_received_condition);
+	ast_mutex_destroy(&messagelock);
 
 	return 0;
 }
@@ -4039,21 +4039,21 @@
 		goto end;
 	}
 
-        ast_manager_register_xml("JabberSend", EVENT_FLAG_SYSTEM, manager_jabber_send);
-
-        ast_register_application_xml(app_ajisend, xmpp_send_exec);
-        ast_register_application_xml(app_ajisendgroup, xmpp_sendgroup_exec);
-        ast_register_application_xml(app_ajistatus, xmpp_status_exec);
-        ast_register_application_xml(app_ajijoin, xmpp_join_exec);
-        ast_register_application_xml(app_ajileave, xmpp_leave_exec);
-
-        ast_cli_register_multiple(xmpp_cli, ARRAY_LEN(xmpp_cli));
-        ast_custom_function_register(&jabberstatus_function);
-        ast_custom_function_register(&jabberreceive_function);
-        ast_msg_tech_register(&msg_tech);
-
-        ast_mutex_init(&messagelock);
-        ast_cond_init(&message_received_condition, NULL);
+	ast_manager_register_xml("JabberSend", EVENT_FLAG_SYSTEM, manager_jabber_send);
+
+	ast_register_application_xml(app_ajisend, xmpp_send_exec);
+	ast_register_application_xml(app_ajisendgroup, xmpp_sendgroup_exec);
+	ast_register_application_xml(app_ajistatus, xmpp_status_exec);
+	ast_register_application_xml(app_ajijoin, xmpp_join_exec);
+	ast_register_application_xml(app_ajileave, xmpp_leave_exec);
+
+	ast_cli_register_multiple(xmpp_cli, ARRAY_LEN(xmpp_cli));
+	ast_custom_function_register(&jabberstatus_function);
+	ast_custom_function_register(&jabberreceive_function);
+	ast_msg_tech_register(&msg_tech);
+
+	ast_mutex_init(&messagelock);
+	ast_cond_init(&message_received_condition, NULL);
 
 	return 0;
 




More information about the asterisk-commits mailing list