[asterisk-commits] jpeeler: branch jpeeler/dahdi-restart r137272 - in /team/jpeeler/dahdi-restar...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 11 15:29:56 CDT 2008


Author: jpeeler
Date: Mon Aug 11 15:29:55 2008
New Revision: 137272

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137272
Log:
removed unneeded code

Modified:
    team/jpeeler/dahdi-restart/channels/chan_dahdi.c
    team/jpeeler/dahdi-restart/main/callerid.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=137272&r1=137271&r2=137272
==============================================================================
--- team/jpeeler/dahdi-restart/channels/chan_dahdi.c (original)
+++ team/jpeeler/dahdi-restart/channels/chan_dahdi.c Mon Aug 11 15:29:55 2008
@@ -1134,28 +1134,10 @@
 	return fd;
 }
 
-/*
-static int fd_status(int fd)
-{
-	int status;
-	status = fcntl(fd, F_GETFD);
-	if (status == -1 && errno == EBADF)
-		ast_log(LOG_WARNING, "**************** fd=%d NOT closed\n", fd);
-
-	return status;
-}
-*/
-
 static void dahdi_close(int fd)
 {
-	//int status;
 	if (fd > 0)
 		close(fd);
-	//status = fcntl(fd, F_GETFD);
-	//if (status == -1)
-	//	ast_log(LOG_WARNING, "**************** fd=%d NOT closed\n", fd);
-	//else
-	//	ast_log(LOG_WARNING, "Close looks good %d for fd=%d\n", status, fd);
 }
 
 static int dahdi_setlinear(int zfd, int linear)
@@ -1880,8 +1862,6 @@
 {
 	int x, y, res;
 	x = muted;
-	if (!p)
-		return -1;
 	if ((p->sig == SIG_PRI) || (p->sig == SIG_SS7) || (p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP)) {
 		y = 1;
 		res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_AUDIOMODE, &y);
@@ -2803,10 +2783,9 @@
 		ast_event_unsubscribe(p->mwi_event_sub);
 	if (p->vars)
 		ast_variables_destroy(p->vars);
-	//ast_mutex_destroy(&p->lock);
+	ast_mutex_destroy(&p->lock);
 	if (p->owner)
 		p->owner->tech_pvt = NULL;
-	//memset(p, 0, sizeof(*p));
 	ast_free(p);
 	*pvt = NULL;
 }
@@ -3509,9 +3488,6 @@
 		errno = EINVAL;
 		return -1;
 	}
-
-	if (!p)
-		return -1;
 
 	switch (option) {
 	case AST_OPTION_TXGAIN:

Modified: team/jpeeler/dahdi-restart/main/callerid.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/dahdi-restart/main/callerid.c?view=diff&rev=137272&r1=137271&r2=137272
==============================================================================
--- team/jpeeler/dahdi-restart/main/callerid.c (original)
+++ team/jpeeler/dahdi-restart/main/callerid.c Mon Aug 11 15:29:55 2008
@@ -803,10 +803,6 @@
 	float ci = 0.0;
 	float scont = 0.0;
 
-	if (!buf) {
-		return 0; /* if another thread canceled the VMWI request */ 
-	}
-	
 	if (type == CID_MWI_TYPE_MDMF_FULL) {
 		/* MDMF Message waiting with date, number, name and MWI parameter */
 		msg[0] = 0x82;




More information about the asterisk-commits mailing list