# HG changeset patch # User gongo # Date 1162968647 0 # Node ID 46b8f2109d34d183be6df1c1b133f87e8aac6ba9 # Parent a333d360ea6fd51db185a0831515b6dee374f21f *** empty log message *** diff -r a333d360ea6f -r 46b8f2109d34 linda.c --- a/linda.c Wed Nov 08 06:46:17 2006 +0000 +++ b/linda.c Wed Nov 08 06:50:47 2006 +0000 @@ -117,8 +117,14 @@ for (i=1; i<=CLIENT_MAX; i++) { get_packet(i, &flg, NULL, NULL, NULL, NULL); - if (i == id) continue; - if (flg == 1) connect++; + if (i == id) { + flg = 0; + continue; + } + if (flg == 1) { + connect++; + flg = 0; + } } if (connect == CLIENT_MAX) { @@ -154,9 +160,14 @@ for (i=1; i<=CLIENT_MAX; i++) { get_packet(i, &flg, &mode, NULL, NULL, NULL); - if (i == id) continue; - if (flg == 1 && mode == MODE_WAIT_READY) + if (i == id) { + flg = 0; + continue; + } + if (flg == 1 && mode == MODE_WAIT_READY) { connect++; + flg = 0; + } } if (connect == CLIENT_MAX) { @@ -192,9 +203,14 @@ for (i=1; i<=CLIENT_MAX; i++) { get_packet(i, &flg, &mode, NULL, NULL, NULL); - if (i == id) continue; - if (flg == 1 && mode == MODE_OPENING) + if (i == id) { + flg = 0; + continue; + } + if (flg == 1 && mode == MODE_OPENING) { connect++; + flg = 0; + } } if (connect == CLIENT_MAX) { @@ -229,9 +245,14 @@ for (i=1; i<=CLIENT_MAX; i++) { get_packet(i, &flg, &mode, NULL, NULL, NULL); - if (i == id) continue; - if (flg == 1 && mode == MODE_SELECT_CAR) + if (i == id) { + flg = 0; + continue; + } + if (flg == 1 && mode == MODE_SELECT_CAR) { connect++; + flg = 0; + } } if (connect == CLIENT_MAX) { @@ -275,9 +296,15 @@ for (i=1; i<=CLIENT_MAX; i++) { get_packet(i, &flg, &mode, NULL, NULL, NULL); - if (i == id) continue; - if (flg == 1 && mode == MODE_SELECT_COURSE) + if (i == id) { + flg = 0; + continue; + } + if (flg == 1 && mode == MODE_SELECT_COURSE) { connect++; + flg = 0; + } + } if (connect == CLIENT_MAX) {