Commit 26366a30 authored by Olav Kvittem's avatar Olav Kvittem

read poll-file to tmp to achieve more atomicity


git-svn-id: file:///home/svn/sipshaman/trunk@34 9383e1fa-a92b-456e-b4ec-45f0d4f7abeb
parent 0421aee1
......@@ -21,6 +21,12 @@ export IFS=";"
addr=`/sbin/ifconfig eth0| perl -ne 'print $1 if /inet addr:(\d+\.\d+\.\d+\.\d+)/'`
tmp=/tmp/sipshaman-poll.cf$$
# read poll file atomicly
while read poll; do
echo $poll >> $tmp
done
while read server service outproxy function machine calls; do
if test -z "$server"; then
continue
......@@ -47,7 +53,8 @@ while read server service outproxy function machine calls; do
mport=$(($mport+4))
sleep 3
fi
done
done < $tmp
unlink $tmp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment