[asterisk-commits] russell: trunk r100514 - /trunk/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 27 18:56:14 CST 2008


Author: russell
Date: Sun Jan 27 18:56:14 2008
New Revision: 100514

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100514
Log:
These readlocks always fail for me on my mac, and I saw it happen again
today on another mac.  We ignore the return value of locking operations almost
everywhere in Asterisk.  So, ignore these, as well, so Asterisk will actually
work on systems where this is occurring while I look into what the issue is.

Modified:
    trunk/main/channel.c

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=100514&r1=100513&r2=100514
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sun Jan 27 18:56:14 2008
@@ -207,10 +207,7 @@
 	ast_cli(a->fd, FORMAT, "Type", "Description",       "Devicestate", "Indications", "Transfer");
 	ast_cli(a->fd, FORMAT, "----------", "-----------", "-----------", "-----------", "--------");
 
-	if (AST_RWLIST_RDLOCK(&channels)) {
-		ast_log(LOG_WARNING, "Unable to lock channel list\n");
-		return CLI_FAILURE;
-	}
+	AST_RWLIST_RDLOCK(&channels);
 
 	AST_LIST_TRAVERSE(&backends, cl, list) {
 		ast_cli(a->fd, FORMAT, cl->tech->type, cl->tech->description,
@@ -270,10 +267,7 @@
 	if (a->argc != 4)
 		return CLI_SHOWUSAGE;
 	
-	if (AST_RWLIST_RDLOCK(&channels)) {
-		ast_log(LOG_WARNING, "Unable to lock channel list\n");
-		return CLI_FAILURE;
-	}
+	AST_RWLIST_RDLOCK(&channels);
 
 	AST_LIST_TRAVERSE(&backends, cl, list) {
 		if (!strncasecmp(cl->tech->type, a->argv[3], strlen(cl->tech->type)))
@@ -468,10 +462,7 @@
 	struct chanlist *chanls;
 	const struct ast_channel_tech *ret = NULL;
 
-	if (AST_RWLIST_RDLOCK(&channels)) {
-		ast_log(LOG_WARNING, "Unable to lock channel tech list\n");
-		return NULL;
-	}
+	AST_RWLIST_RDLOCK(&channels);
 
 	AST_LIST_TRAVERSE(&backends, chanls, list) {
 		if (!strcasecmp(name, chanls->tech->type)) {




More information about the asterisk-commits mailing list