[asterisk-dev] [svn-commits] jrose: branch 1.8 r374032 - /branches/1.8/res/res_jabber.c
Olle E. Johansson
oej at edvina.net
Sat Sep 29 08:07:54 CDT 2012
It could be a configuration option so you input a jabber URI to test with. It is a piece of useful code.
/O
28 sep 2012 kl. 21:03 skrev SVN commits to the Digium repositories <svn-commits at lists.digium.com>:
> Author: jrose
> Date: Fri Sep 28 14:03:19 2012
> New Revision: 374032
>
> URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374032
> Log:
> res_jabber: Remove CLI command 'jabber test'
>
> The opinion of development was that it is both improper to have Matt's
> personal email address used in the source and that the command wouldn't
> be useful without it.
>
> (closes issue AST-467)
> Reported by: Malcolm Davenport
>
> Modified:
> branches/1.8/res/res_jabber.c
>
> Modified: branches/1.8/res/res_jabber.c
> URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_jabber.c?view=diff&rev=374032&r1=374031&r2=374032
> ==============================================================================
> --- branches/1.8/res/res_jabber.c (original)
> +++ branches/1.8/res/res_jabber.c Fri Sep 28 14:03:19 2012
> @@ -312,7 +312,6 @@
> static char *aji_do_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
> static char *aji_show_clients(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
> static char *aji_show_buddies(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
> -static char *aji_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
> static int aji_create_client(char *label, struct ast_variable *var, int debug);
> static int aji_create_buddy(char *label, struct aji_client *client);
> static int aji_reload(int reload);
> @@ -377,7 +376,6 @@
> AST_CLI_DEFINE(aji_do_reload, "Reload Jabber configuration"),
> AST_CLI_DEFINE(aji_show_clients, "Show state of clients and components"),
> AST_CLI_DEFINE(aji_show_buddies, "Show buddy lists of our clients"),
> - AST_CLI_DEFINE(aji_test, "Shows roster, but is generally used for mog's debugging."),
> AST_CLI_DEFINE(aji_cli_create_collection, "Creates a PubSub node collection."),
> AST_CLI_DEFINE(aji_cli_list_pubsub_nodes, "Lists PubSub nodes"),
> AST_CLI_DEFINE(aji_cli_create_leafnode, "Creates a PubSub leaf node"),
> @@ -4177,69 +4175,6 @@
> });
> iterator = client;
> });
> - return CLI_SUCCESS;
> -}
> -
> -/*!
> - * \internal
> - * \brief Send test message for debugging.
> - * \return CLI_SUCCESS,CLI_FAILURE.
> - */
> -static char *aji_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
> -{
> - struct aji_client *client;
> - struct aji_resource *resource;
> - const char *name;
> - struct aji_message *tmp;
> -
> - switch (cmd) {
> - case CLI_INIT:
> - e->command = "jabber test";
> - e->usage =
> - "Usage: jabber test <connection>\n"
> - " Sends test message for debugging purposes. A specific client\n"
> - " as configured in jabber.conf must be specified.\n";
> - return NULL;
> - case CLI_GENERATE:
> - return NULL;
> - }
> -
> - if (a->argc != 3) {
> - return CLI_SHOWUSAGE;
> - }
> - name = a->argv[2];
> -
> - if (!(client = ASTOBJ_CONTAINER_FIND(&clients, name))) {
> - ast_cli(a->fd, "Unable to find client '%s'!\n", name);
> - return CLI_FAILURE;
> - }
> -
> - /* XXX Does Matt really want everyone to use his personal address for tests? */ /* XXX yes he does */
> - ast_aji_send_chat(client, "mogorman at astjab.org", "blahblah");
> - ASTOBJ_CONTAINER_TRAVERSE(&client->buddies, 1, {
> - ASTOBJ_RDLOCK(iterator);
> - ast_verbose("User: %s\n", iterator->name);
> - for (resource = iterator->resources; resource; resource = resource->next) {
> - ast_verbose("Resource: %s\n", resource->resource);
> - if (resource->cap) {
> - ast_verbose(" client: %s\n", resource->cap->parent->node);
> - ast_verbose(" version: %s\n", resource->cap->version);
> - ast_verbose(" Jingle Capable: %d\n", resource->cap->jingle);
> - }
> - ast_verbose(" Priority: %d\n", resource->priority);
> - ast_verbose(" Status: %d\n", resource->status);
> - ast_verbose(" Message: %s\n", S_OR(resource->description, ""));
> - }
> - ASTOBJ_UNLOCK(iterator);
> - });
> - ast_verbose("\nOooh a working message stack!\n");
> - AST_LIST_LOCK(&client->messages);
> - AST_LIST_TRAVERSE(&client->messages, tmp, list) {
> - //ast_verbose(" Message from: %s with id %s @ %s %s\n",tmp->from, S_OR(tmp->id,""), ctime(&tmp->arrived), S_OR(tmp->message, ""));
> - }
> - AST_LIST_UNLOCK(&client->messages);
> - ASTOBJ_UNREF(client, ast_aji_client_destroy);
> -
> return CLI_SUCCESS;
> }
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/svn-commits
---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120929/5907a429/attachment-0001.htm>
More information about the asterisk-dev
mailing list