Andre
2006-07-11 15:49:27 UTC
Hi there,
I have recently taken over development responsibility for a fairly mature
CAPI application, and now I am trying to debug and solve a problem that is
happening at a particular site. Unfortunately I am not local to the site
(other side of the country), nor do I have remote access, and the problem
doesn't happen at my site, so I can't reproduce it in detail, nor do
specific debugging traces.
The symptoms are that, at this site, the application occasionally fails with
one of the following error messages:
- either a "CAPI failed to start listening within timeout period" when it is
trying to move from state L-0.1 to L-1
- or a "CAPI failed to stop listening within timeout period" when it is
trying to move from state L-1.1 to L-0
Looking at the code, I see that the application sends out a LISTEN_REQ with
an InfoMask of "InfoMask_ALL_BUT_EARLYB3CONNECT" (hex 5FF) when it wants to
start listening, or a LISTEN_REQ with an InfoMask of 0 when it wants to stop
listening. So far, so good. The application code then waits for a timeout
period (currently 5 seconds) for the driver to respond with a LISTEN_CONF.
Again, so far, so good -- most of the time.
However, at the problem site, the LISTEN_CONF is often not received within
the timeout period, so everything breaks. The machine is probably
under-powered, so it would make sense for things to happen slowly on the
machine. Again, this is one of those intermittent problems, in that it
sometimes DOES work at that site (perhaps when the machine is not so busy,
although I cannot tell).
My question is two-fold:
- is it a correct and reasonable strategy to implement a timeout when
waiting for the LISTEN_CONF response?
- if so, is 5 seconds a reasonable timeout value?
At this stage, my inclination is just to increase the timeout value to, say,
30 seconds, and get the support technician to try the updated program at the
client site.
Regards,
Andre
I have recently taken over development responsibility for a fairly mature
CAPI application, and now I am trying to debug and solve a problem that is
happening at a particular site. Unfortunately I am not local to the site
(other side of the country), nor do I have remote access, and the problem
doesn't happen at my site, so I can't reproduce it in detail, nor do
specific debugging traces.
The symptoms are that, at this site, the application occasionally fails with
one of the following error messages:
- either a "CAPI failed to start listening within timeout period" when it is
trying to move from state L-0.1 to L-1
- or a "CAPI failed to stop listening within timeout period" when it is
trying to move from state L-1.1 to L-0
Looking at the code, I see that the application sends out a LISTEN_REQ with
an InfoMask of "InfoMask_ALL_BUT_EARLYB3CONNECT" (hex 5FF) when it wants to
start listening, or a LISTEN_REQ with an InfoMask of 0 when it wants to stop
listening. So far, so good. The application code then waits for a timeout
period (currently 5 seconds) for the driver to respond with a LISTEN_CONF.
Again, so far, so good -- most of the time.
However, at the problem site, the LISTEN_CONF is often not received within
the timeout period, so everything breaks. The machine is probably
under-powered, so it would make sense for things to happen slowly on the
machine. Again, this is one of those intermittent problems, in that it
sometimes DOES work at that site (perhaps when the machine is not so busy,
although I cannot tell).
My question is two-fold:
- is it a correct and reasonable strategy to implement a timeout when
waiting for the LISTEN_CONF response?
- if so, is 5 seconds a reasonable timeout value?
At this stage, my inclination is just to increase the timeout value to, say,
30 seconds, and get the support technician to try the updated program at the
client site.
Regards,
Andre