Module: sip-router
Branch: 4.1
Commit: 92aaaab324b37d75358b21825850ade8a3481cd5
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=92aaaab324b37d75358b21825850ade8a3481cd5

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date:   Mon Mar  3 14:39:25 2014 +0100

kamctl: delete former fifo files if they exist

- reported by Morten Tryfoss, FS#399

(cherry picked from commit ec9e735955f58ef21bac21ba57eafd07db675e4d)

---

 utils/kamctl/kamctl.fifo |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/utils/kamctl/kamctl.fifo b/utils/kamctl/kamctl.fifo
index 50c8e92..e57c7df 100644
--- a/utils/kamctl/kamctl.fifo
+++ b/utils/kamctl/kamctl.fifo
@@ -57,6 +57,10 @@ fifo_cmd()
        fi
        name=kamailio_receiver_$$
        path=$CHROOT_DIR/tmp/$name
+       # delete existing fifo file with same name
+       if test -p $path; then
+               rm -f $path
+       fi
        if [ ! -w $FIFOPATH ]; then
                merr "Error opening Kamailio's FIFO $FIFOPATH"
                merr "Make sure you have the line 'modparam(\"mi_fifo\", 
\"fifo_name\", \"$FIFOPATH\")' in your config"
@@ -106,6 +110,10 @@ CTLCMD=fifo_cmd
 fifo_kamailio_monitor() {
        name=kamailio_receiver_$$
        path=$CHROOT_DIR/tmp/$name
+       # delete existing fifo file with same name
+       if test -p $path; then
+               rm -f $path
+       fi
        if [ ! -w $FIFOPATH ]; then
                merr "Error opening Kamailio's FIFO $FIFOPATH"
                merr "Make sure you have the line 'modparam(\"mi_fifo\", 
\"fifo_name\", \"$FIFOPATH\")' in your config"


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to