proc1_list *plist;
f_print(fout, "{\tafs_int32 rcode, code, newHost, thisHost, i, _ucount;\n");
- f_print(fout, "\tint chaseCount, pass, needsync, inlist;\n");
+ f_print(fout, "\tint chaseCount, pass, needsync;\n");
#if 0 /* goes with block below */
- f_print(fout, "\tint j;\n");
+ f_print(fout, "\tint j, inlist;\n");
#endif
f_print(fout, "\tstruct rx_connection *tc;\n");
f_print(fout, "\tstruct rx_peer *rxp;\n");
f_print(fout, "\t restart:\n");
f_print(fout, "\torigLevel = aclient->initializationState;\n");
f_print(fout, "\trcode = UNOSERVERS;\n");
- f_print(fout, "\tchaseCount = inlist = needsync = 0;\n\n");
+ f_print(fout, "\tchaseCount = needsync = 0;\n\n");
#if 0 /* We should do some sort of caching algorithm for this, but I need to think about it - shadow 26 jun 06 */
+ f_print(fout, "\tinlist = 0;\n");
f_print(fout, "\tLOCK_UCLNT_CACHE;\n");
f_print(fout, "\tfor (j = 0; ((j < SYNCCOUNT) && calls_needsync[j]); j++) {\n");
f_print(fout, "\t\tif (calls_needsync[j] == (int *)%s%s%s) {\n", prefix, PackagePrefix[PackageIndex], defp->pc.proc_name);
f_print(fout, "\t} /*p */\n\n");
f_print(fout, "\tdone:\n");
f_print(fout, "\tif (needsync) {\n");
- f_print(fout, "\t\tif (!inlist) { /* Remember proc call that needs sync site */\n");
+
#if 0 /* We should do some sort of caching algorithm for this, but I need to think about it - shadow 26 jun 06 */
+ f_print(fout, "\t\tif (!inlist) { /* Remember proc call that needs sync site */\n");
f_print(fout, "\t\t\tLOCK_UCLNT_CACHE;\n");
f_print(fout, "\t\t\tcalls_needsync[synccount % SYNCCOUNT] = (int *)%s%s%s;\n", prefix, PackagePrefix[PackageIndex], defp->pc.proc_name);
f_print(fout, "\t\t\tsynccount++;\n");
f_print(fout, "\t\t\tUNLOCK_UCLNT_CACHE;\n");
-#endif
f_print(fout, "\t\t\tinlist = 1;\n");
f_print(fout, "\t\t}\n");
+#endif
f_print(fout, "\t\tif (!rcode) { /* Remember the sync site - cmd successful */\n");
f_print(fout, "\t\t\trxp = rx_PeerOf(aclient->conns[_ucount]);\n");
f_print(fout, "\t\t\taclient->syncSite = rx_HostOf(rxp);\n");