[Asterisk-cvs] asterisk/apps app_meetme.c,1.34,1.35

markster at lists.digium.com markster at lists.digium.com
Tue Jun 1 18:38:06 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv17306/apps

Modified Files:
	app_meetme.c 
Log Message:
Oops slightly premature


Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- app_meetme.c	1 Jun 2004 22:53:52 -0000	1.34
+++ app_meetme.c	1 Jun 2004 22:54:18 -0000	1.35
@@ -92,7 +92,7 @@
 
 static struct ast_conference {
 	char confno[AST_MAX_EXTENSION];		/* Conference */
-	struct ast_channel *chan;		/* Announcements channel */
+	int fd;				/* Announcements fd */
 	int zapconf;			/* Zaptel Conf # */
 	int users;			/* Number of active users */
 	int markedusers;		  /* Number of marked users */
@@ -181,7 +181,7 @@
 		len = 0;
 	}
 	if (data) 
-		careful_write(conf->chan->fds[0], data, len);
+		careful_write(conf->fd, data, len);
 	ast_mutex_unlock(&conflock);
 }
 
@@ -203,8 +203,8 @@
 			memset(cnf, 0, sizeof(struct ast_conference));
 			strncpy(cnf->confno, confno, sizeof(cnf->confno) - 1);
 			strncpy(cnf->pin, pin, sizeof(cnf->pin) - 1);
-			cnf->chan = ast_request("zap", AST_FORMAT_ULAW, "pseudo");
-			if (!cnf->chan) {
+			cnf->fd = open("/dev/zap/pseudo", O_RDWR);
+			if (cnf->fd < 0) {
 				ast_log(LOG_WARNING, "Unable to open pseudo channel\n");
 				free(cnf);
 				cnf = NULL;
@@ -214,10 +214,10 @@
 			/* Setup a new zap conference */
 			ztc.chan = 0;
 			ztc.confno = -1;
-			ztc.confmode = ZT_CONF_CONFANN;
-			if (ioctl(cnf->chan->fds[0], ZT_SETCONF, &ztc)) {
+			ztc.confmode = ZT_CONF_CONF | ZT_CONF_TALKER | ZT_CONF_LISTENER;
+			if (ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
 				ast_log(LOG_WARNING, "Error setting conference\n");
-				ast_hangup(cnf->chan);
+				close(cnf->fd);
 				free(cnf);
 				cnf = NULL;
 				goto cnfout;
@@ -927,7 +927,7 @@
 		}
 		if (!cur) 
 			ast_log(LOG_WARNING, "Conference not found\n");
-		ast_hangup(conf->chan);
+		close(conf->fd);
 		free(conf);
 		} else {
 			/* Remove the user struct */ 




More information about the svn-commits mailing list