aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 05:05:18 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 05:05:18 +0000
commit2681c79d53a8f38fb6ae228ed31d989a1871eeaa (patch)
treeb4f870cc805240783c975146e390cce62228a03c /apps/app_rpt.c
parent01f16e1850a273f573b25905e5689a07f8dd71b1 (diff)
Merged revisions 159050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r159050 | tilghman | 2008-11-24 23:02:11 -0600 (Mon, 24 Nov 2008) | 10 lines Merged revisions 159025 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r159025 | tilghman | 2008-11-24 22:50:00 -0600 (Mon, 24 Nov 2008) | 3 lines System call ioperm is non-portable, so check for its existence in autoconf. (Closes issue #13863) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@159053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r--apps/app_rpt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index be52773ac..1c2dbd4e1 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -331,7 +331,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IO_H
#include <sys/io.h>
+#endif
#include <sys/vfs.h>
#include <math.h>
#include <dahdi/user.h>
@@ -4483,6 +4485,7 @@ struct dahdi_params par;
{
res = set_ic706(myrpt);
}
+#ifdef HAVE_IOPERM
else if(!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16))
{
if (ioperm(myrpt->p.iobase,1,1) == -1)
@@ -4493,6 +4496,7 @@ struct dahdi_params par;
}
else res = setrbi(myrpt);
}
+#endif
else if(!strcmp(myrpt->remoterig, remote_rig_kenwood))
{
if (myrpt->iofd >= 0) setdtr(myrpt->iofd,1);
@@ -10756,7 +10760,8 @@ char tmpstr[300],lstr[MAXLINKLIST];
rpt_mutex_unlock(&myrpt->lock);
usleep(100000);
rpt_mutex_lock(&myrpt->lock);
- }
+ }
+#ifdef HAVE_IOPERM
if ((!strcmp(myrpt->remoterig, remote_rig_rbi)) &&
(ioperm(myrpt->p.iobase,1,1) == -1))
{
@@ -10765,6 +10770,7 @@ char tmpstr[300],lstr[MAXLINKLIST];
myrpt->rpt_thread = AST_PTHREADT_STOP;
pthread_exit(NULL);
}
+#endif
strncpy(tmpstr,myrpt->rxchanname,sizeof(tmpstr) - 1);
tele = strchr(tmpstr,'/');
if (!tele)
@@ -13721,6 +13727,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
}
}
+#ifdef HAVE_IOPERM
if ( (!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) &&
(ioperm(myrpt->p.iobase,1,1) == -1))
{
@@ -13728,6 +13735,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Can't get io permission on IO port %x hex\n",myrpt->p.iobase);
return -1;
}
+#endif
myrpt->remoteon = 1;
#ifdef OLD_ASTERISK
LOCAL_USER_ADD(u);