[asterisk-commits] jpeeler: branch jpeeler/dahdi-restart r137276 - /team/jpeeler/dahdi-restart/c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 11 16:02:42 CDT 2008


Author: jpeeler
Date: Mon Aug 11 16:02:42 2008
New Revision: 137276

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137276
Log:
remove some old comments and unneeded locking

Modified:
    team/jpeeler/dahdi-restart/channels/chan_dahdi.c

Modified: team/jpeeler/dahdi-restart/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/dahdi-restart/channels/chan_dahdi.c?view=diff&rev=137276&r1=137275&r2=137276
==============================================================================
--- team/jpeeler/dahdi-restart/channels/chan_dahdi.c (original)
+++ team/jpeeler/dahdi-restart/channels/chan_dahdi.c Mon Aug 11 16:02:42 2008
@@ -890,7 +890,8 @@
 		}
 	} while (res);
 	/* Then break the poll */
-	pthread_kill(pri->master, SIGURG);
+	if (pri->master != AST_PTHREADT_NULL) /* if dahdi_hangup is called after monitor thread is stopped for restart */
+		pthread_kill(pri->master, SIGURG);
 	return 0;
 }
 #endif
@@ -1119,7 +1120,7 @@
 			x = errno;
 			close(fd);
 			errno = x;
-			ast_log(LOG_WARNING, "Failed to specify channel %d: %s\n", chan, strerror(errno));
+			ast_log(LOG_WARNING, "Unable to specify channel %d: %s\n", chan, strerror(errno));
 			return -1;
 		}
 	}
@@ -2770,8 +2771,6 @@
 {
 	struct dahdi_pvt *p = *pvt;
 
-	ast_mutex_lock(&p->lock);
-	ast_mutex_unlock(&p->lock);
 	/* Remove channel from the list */
 	if (p->prev)
 		p->prev->next = p->next;
@@ -2859,16 +2858,6 @@
 	/* Destroy all the interfaces and free their memory */
 	p = iflist;
 	while (p) {
-/*
-if (p->owner) {
-	for (x = 0; x < 10; x++) {
-		ast_log(LOG_WARNING, "p->owner=%p fd[%d]=%d\n", p->owner, x, p->owner->fds[x]);
-	}
-} else {
-	ast_log(LOG_WARNING, "No owner\n");
-}
-*/
-
 		/* Free any callerid */
 		if (p->cidspill)
 			ast_free(p->cidspill);




More information about the asterisk-commits mailing list