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;
} 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);
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) {
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");
&& (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*/ ");
psproc1(defp, 2, "int", "ubik_", 0xFFFFFFFF);
if (*ServerPrefix)
- psproc1(defp, 1, "afs_int32", ServerPrefix, 0xFFFFFFFF);
+ psproc1(defp, 3, "afs_int32", ServerPrefix, 0xFFFFFFFF);
}
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;
}
}
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);
}
}
}