diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-19 19:48:00 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-19 19:48:00 +0000 |
commit | f2eeca3bed9fef3110ee1946504e3b382341d7fc (patch) | |
tree | f32d0af75adb1ba287d025ed312df096422a910a /apps/app_meetme.c | |
parent | a78774210ab8a62f2f675688748a02a227f67aef (diff) |
(closes issue #13480)
Reported by: tzafrir
Replace a bunch of if defined checks for Zaptel/DAHDI through several new defines in dahdi_compat.h. This removes a lot of code duplication. Example from bug:
#ifdef HAVE_ZAPTEL
fd = open("/dev/zap/pseudo", O_RDWR);
#else
fd = open("/dev/dahdi/pseudo", O_RDWR);
#endif
is replaced with:
fd = open(DAHDI_FILE_PSEUDO, O_RDRW);
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r-- | apps/app_meetme.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index f526279ef..2503b0f38 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -795,11 +795,7 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin /* Setup a new zap conference */ ztc.confno = -1; ztc.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON; -#ifdef HAVE_ZAPTEL - cnf->fd = open("/dev/zap/pseudo", O_RDWR); -#else - cnf->fd = open("/dev/dahdi/pseudo", O_RDWR); -#endif + cnf->fd = open(DAHDI_FILE_PSEUDO, O_RDWR); if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &ztc)) { ast_log(LOG_WARNING, "Unable to open pseudo device\n"); if (cnf->fd >= 0) @@ -1732,11 +1728,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c zapretry: origfd = chan->fds[0]; if (retryzap) { -#ifdef HAVE_ZAPTEL - fd = open("/dev/zap/pseudo", O_RDWR); -#else - fd = open("/dev/dahdi/pseudo", O_RDWR); -#endif + fd = open(DAHDI_FILE_PSEUDO, O_RDWR); if (fd < 0) { ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno)); goto outrun; |