[ntp:bugs] [Bug 367] ACTS driver hangs up after header receipt
bugzilla at ntp.org
bugzilla at ntp.org
Thu Mar 31 00:04:36 UTC 2005
http://bugzilla.ntp.org/show_bug.cgi?id=367
------- Additional Comments From gdowd at symmetricom.com 2005-03-31 00:04 -------
Hi Dave,
I don't pretend to be an I/O guy but we've been running into this same error
in different forms for at least a few years and I haven't seen anyone clamoring
for the chance to fix it. I don't know a minimum quiet time but I don't like
to find sleeps in the middle of code so how about using the timeout you've
created and just add 1 more state between the open and the initialization.
Thanks....Greg
--- refclock_acts.c.original 2005-03-28 13:01:56.000000000 -0800
+++ refclock_acts.c 2005-03-30 14:55:41.000000000 -0800
@@ -177,6 +177,7 @@
/*
* Timeouts (all in seconds)
*/
+#define MIN_QUIET 1 /* enforce minimum quiet time */
#define SETUP 3 /* setup timeout */
#define ANSWER 60 /* answer timeout */
#define CONNECT 20 /* first valid message timeout */
@@ -186,11 +187,12 @@
* State machine codes
*/
#define S_IDLE 0 /* wait for poll */
-#define S_OK 1 /* wait for modem */
-#define S_CONNECT 2 /* wait for answer*/
-#define S_FIRST 3 /* wait for first valid message */
-#define S_MSG 4 /* wait for all messages */
-#define S_CLOSE 5 /* wait after sending disconnect */
+#define S_OPENING 1 /* wait for dev opened */
+#define S_OK 2 /* wait for modem */
+#define S_CONNECT 3 /* wait for answer*/
+#define S_FIRST 4 /* wait for first valid message */
+#define S_MSG 5 /* wait for all messages */
+#define S_CLOSE 6 /* wait after sending disconnect */
/*
* Unit control structure
@@ -804,9 +806,14 @@
return;
}
- /*
- * Initialize the modem. This works with Hayes commands.
- */
+ up->state = S_OPENING;
+ up->timer = MIN_QUIET;
+ return;
+
+ /*
+ * Initialize the modem. This works with Hayes commands.
+ */
+ case S_OPENING:
#ifdef DEBUG
if (debug)
printf("acts: setup %s\n", MODEM_SETUP);
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the bugs
mailing list