aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-11 10:29:18 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-11 10:29:18 +0000
commit4469af7edc9b542412c75d1f7b38653d992685f3 (patch)
tree7b84c14e8fa41addcd6a0e519c585a902bac7baf /channels/chan_misdn.c
parent0f0446f2dd6e944f71c8ba725e00e2354e16191b (diff)
Merged revisions 68631 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68631 | crichter | 2007-06-11 11:18:01 +0200 (Mo, 11 Jun 2007) | 1 line fixed problem that the dummybc chanels had no lock, checking for the lock now. Also fixed the channel restart stuff, we can now specify and restart particular channels too. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68644 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index af093fb75..5157302b7 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -793,7 +793,7 @@ static int misdn_set_crypt_debug(int fd, int argc, char *argv[])
static int misdn_port_block(int fd, int argc, char *argv[])
{
int port;
-
+
if (argc != 4)
return RESULT_SHOWUSAGE;
@@ -847,20 +847,6 @@ static int misdn_restart_pid (int fd, int argc, char *argv[])
return 0;
}
-static int misdn_send_restart(int fd, int argc, char *argv[])
-{
- int port;
-
- if (argc != 4)
- return RESULT_SHOWUSAGE;
-
- port = atoi(argv[3]);
-
- misdn_lib_send_restart(port);
-
- return 0;
-}
-
static int misdn_port_up (int fd, int argc, char *argv[])
{
int port;
@@ -1280,6 +1266,25 @@ static int misdn_send_cd (int fd, int argc, char *argv[])
return 0;
}
+static int misdn_send_restart(int fd, int argc, char *argv[])
+{
+ int port;
+ int channel;
+
+ if ( (argc < 4) || (argc > 5) )
+ return RESULT_SHOWUSAGE;
+
+ port = atoi(argv[3]);
+
+ if (argc==5) {
+ channel = atoi(argv[4]);
+ misdn_lib_send_restart(port, channel);
+ } else
+ misdn_lib_send_restart(port, -1 );
+
+ return 0;
+}
+
static int misdn_send_digit (int fd, int argc, char *argv[])
{
char *channame;