[asterisk-commits] russell: branch russell/events r59293 - /team/russell/events/res/res_eventtest.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Mar 28 13:27:42 MST 2007


Author: russell
Date: Wed Mar 28 15:27:41 2007
New Revision: 59293

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59293
Log:
remove test that is no longer needed

Modified:
    team/russell/events/res/res_eventtest.c

Modified: team/russell/events/res/res_eventtest.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/res/res_eventtest.c?view=diff&rev=59293&r1=59292&r2=59293
==============================================================================
--- team/russell/events/res/res_eventtest.c (original)
+++ team/russell/events/res/res_eventtest.c Wed Mar 28 15:27:41 2007
@@ -117,61 +117,6 @@
 	return CLI_SUCCESS;
 }
 
-static char *event_test_publisher(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
-	struct ast_event_pub *pub;
-	const char *mailbox = "1234 at fakecontext";
-
-	switch (cmd) {
-	case CLI_INIT:
-		e->command = "event test publisher";
-		e->usage =
-			"Usage: event test publisher\n"
-			"       Test registering and checking for an event publisher.\n";
-		return NULL;
-
-	case CLI_GENERATE:
-		return NULL;	/* no completion */
-	}
-	if (a->argc != e->args)
-		return CLI_SHOWUSAGE;
-
-	ast_cli(a->fd, "Checking for a publisher that should not exist ...");
-	if (ast_event_check_publisher(AST_EVENT_MWI,
-		AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
-		AST_EVENT_IE_END) == AST_EVENT_PUB_NONE)
-		ast_cli(a->fd, "Passed!\n");
-	else {
-		ast_cli(a->fd, "Failed!\n");
-		return CLI_FAILURE;
-	}
-
-	if (!(pub = ast_event_reg_publisher(AST_EVENT_MWI,
-		AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
-		AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
-		AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
-		AST_EVENT_IE_END))) {
-		ast_cli(a->fd, "Failed to register publisher!\n");
-		return CLI_FAILURE;
-	}
-
-	ast_cli(a->fd, "Checking for a publisher that should exist ...");
-	if (ast_event_check_publisher(AST_EVENT_MWI,
-		AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
-		AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
-		AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
-		AST_EVENT_IE_END) == AST_EVENT_PUB_EXISTS)
-		ast_cli(a->fd, "Passed!\n");
-	else {
-		ast_cli(a->fd, "Failed!\n");
-		return CLI_FAILURE;
-	}
-
-	ast_event_unreg_publisher(pub);
-
-	return CLI_SUCCESS;
-}
-
 static char *event_get_cached(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct ast_event *event;
@@ -212,7 +157,6 @@
 static struct ast_cli_entry cli_commands[] = {
 	NEW_CLI(event_gen, "Generate a test event"),
 	NEW_CLI(event_get_cached, "Get an event from the cache"),
-	NEW_CLI(event_test_publisher, "Test registering and checking a publisher"),
 };
 
 static int load_module(void)



More information about the asterisk-commits mailing list