#"SimpleHost"
2 messages in this thread
This one has really got me puzzled! I've been using the basic form of
"SimpleHost" which is set up like this:
hname = "SIMPLE_HOST" shutdown = 0 TRUE = 1
if openport(hname) then do
if open('cf','con:400/290/200/20/'hname) then do
do until shutdown
call waitpkt(hname)
pkt = getpkt(hname)
rcode = 0
if pkt ~= null() then do
cmd = getarg(pkt)
call reply pkt,0
if upper(cmd)='EXIT' then
do
shutdown = 1
end
Then, when I added "expose shutdown" to the "Procedure"-marked internal
functions, which I thought was the thing to do to make the "quit" available to
the functions, the host would initialize "shutdown = 1" just before the final
"end", and the host quit!
Any idea why this would happen?
Greg
Greg,
It sounds as though one of your internal functions is accidentally setting
shutdown to 1. Have you tried running the host program with tracing turned on
to see where shutdown is getting set?
-Bill