diff --git a/src/libadmin/bos/afs_bosAdmin.c b/src/libadmin/bos/afs_bosAdmin.c index 3d7cf58784..7057d2e9cd 100644 --- a/src/libadmin/bos/afs_bosAdmin.c +++ b/src/libadmin/bos/afs_bosAdmin.c @@ -590,7 +590,7 @@ bos_ProcessExecutionStateGet(const void *serverHandle, static int SetExecutionState(const void *serverHandle, const char *processName, const bos_ProcessExecutionState_t processStatus, - int (*func) (struct rx_connection *, char *, + int (*func) (struct rx_connection *, const char *, afs_int32), afs_status_p st) { int rc = 0; diff --git a/src/rxgen/rpc_cout.c b/src/rxgen/rpc_cout.c index 3d8f475784..0ea37744bc 100644 --- a/src/rxgen/rpc_cout.c +++ b/src/rxgen/rpc_cout.c @@ -519,16 +519,15 @@ print_param(declaration * dec) } else if (streq(type, "opaque")) { alt = "opaque"; } - if (alt) { + if (alt) print_rxifopen(alt); - print_rxifarg(amp, objname, 0); - } else { + else print_rxifopen("vector"); - print_rxifarg(amp, "(char *)", 0); - sprintf(temp, "%s", objname); - strcat(Proc_list->code, temp); - strcat(Proc_list->scode, temp); - } + + print_rxifarg(amp, "(char *)", 0); + sprintf(temp, "%s", objname); + strcat(Proc_list->code, temp); + strcat(Proc_list->scode, temp); print_rxifarg("", amax, 1); if (!alt) { print_rxifsizeof(prefix, type); @@ -547,7 +546,7 @@ print_param(declaration * dec) Proc_list->pl.param_flag |= OUT_STRING; print_rxifarg("", objname, 0); } else - print_rxifarg("&", objname, 0); + print_rxifarg("(char **) &", objname, 0); /* print_rxifarg(amp, objname, 0); */ print_rxifarg("", amax, 1); if (!alt) { diff --git a/src/rxgen/rpc_hout.c b/src/rxgen/rpc_hout.c index 9df8cf7f80..386db3b036 100644 --- a/src/rxgen/rpc_hout.c +++ b/src/rxgen/rpc_hout.c @@ -219,7 +219,7 @@ psproc1(definition * defp, int callTconnF, char *type, char *prefix, f_print(fout, "\nextern %s %s%s%s(\n", type, prefix, defp->pc.proc_prefix, defp->pc.proc_name); - if (callTconnF == 1) { + if (callTconnF == 1 || callTconnF == 3) { f_print(fout, "\t/*IN */ struct rx_call *z_call"); } else if (callTconnF == 2) { f_print(fout, "\tstruct ubik_client *aclient, afs_int32 aflags"); @@ -232,7 +232,10 @@ psproc1(definition * defp, int callTconnF, char *type, char *prefix, && (iomask & (1 << plist->pl.param_kind))) { switch (plist->pl.param_kind) { case DEF_INPARAM: - f_print(fout, ",\n\t/*IN */ "); + f_print(fout, ",\n\t/*IN %d*/ ",callTconnF); + if ((callTconnF != 3) + && strcmp(plist->pl.param_type, "char *")== 0) + f_print(fout, "const "); break; case DEF_OUTPARAM: f_print(fout, ",\n\t/*OUT*/ "); @@ -274,7 +277,7 @@ psprocdef(definition * defp) psproc1(defp, 2, "int", "ubik_", 0xFFFFFFFF); if (*ServerPrefix) - psproc1(defp, 1, "afs_int32", ServerPrefix, 0xFFFFFFFF); + psproc1(defp, 3, "afs_int32", ServerPrefix, 0xFFFFFFFF); } diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c index 8f73265d3d..6e5b93dd80 100644 --- a/src/rxgen/rpc_parse.c +++ b/src/rxgen/rpc_parse.c @@ -1147,16 +1147,21 @@ cs_ProcName_setup(definition * defp, char *procheader, int split_flag) if (!cflag) { for (plist = defp->pc.plists; plist; plist = plist->next) { if (plist->component_kind == DEF_PARAM) { + f_print(fout, ","); if (ansic_flag) { + if (plist->pl.param_kind == DEF_INPARAM && + strcmp(plist->pl.param_type, "char *") == 0) { + f_print(fout, "const "); + } if (plist->pl.param_flag & OUT_STRING) { - f_print(fout, ",%s *%s", plist->pl.param_type, + f_print(fout, "%s *%s", plist->pl.param_type, plist->pl.param_name); } else { - f_print(fout, ",%s %s", plist->pl.param_type, + f_print(fout, "%s %s", plist->pl.param_type, plist->pl.param_name); } } else { - f_print(fout, ", %s", plist->pl.param_name); + f_print(fout, " %s", plist->pl.param_name); plist->pl.param_flag &= ~PROCESSED_PARAM; } } @@ -1735,17 +1740,22 @@ ucs_ProcName_setup(definition * defp, char *procheader, int split_flag) if (!cflag) { for (plist = defp->pc.plists; plist; plist = plist->next) { if (plist->component_kind == DEF_PARAM) { + f_print(fout, ","); if (ansic_flag) { + if (plist->pl.param_kind == DEF_INPARAM && + strcmp(plist->pl.param_type, "char *") == 0) { + f_print(fout, "const "); + } if (plist->pl.param_flag & OUT_STRING) { - f_print(fout, ",%s *%s", plist->pl.param_type, + f_print(fout, "%s *%s", plist->pl.param_type, plist->pl.param_name); } else { - f_print(fout, ",%s %s", plist->pl.param_type, + f_print(fout, "%s %s", plist->pl.param_type, plist->pl.param_name); } } else { plist->pl.param_flag &= ~PROCESSED_PARAM; - f_print(fout, ", %s", plist->pl.param_name); + f_print(fout, " %s", plist->pl.param_name); } } }