- strcpy(buf, "???:???");
- ASSERT(NONNULL(info->host_name), "null host name");
- /* XXX -- check length here */
- strcpy(buf, info->host_name);
- for (cp = buf; *cp; cp++)
- ;
- strcpy(cp, ":???");
- ASSERT(NONNULL(info->service_name), "null service name");
- /* XXX -- check length here */
- strcpy(++cp, info->service_name);
- service_updated = malloc(strlen(buf)+1);
- /* XXX -- check allocation succeeded */
- strcpy(service_updated, buf);
- service_address = malloc(strlen(SERVICE_NAME)+strlen(info->host_name)+1);
- if (!service_address) {
- code = errno;
- info->override = -1;
- return(code);
- }
- strcpy(service_address, info->host_name);
- strcat(service_address, ":");
- strcat(service_address, SERVICE_NAME);
- ASSERT(info->enable, "server is disabled");
- ASSERT(NONNULL(info->target_path), "null target pathname");
- ASSERT(size < MAXPATHLEN, "target pathname too long");
- ASSERT(info->target_path[0] == '/', "non-absolute pathname supplied");
+ ASSERT(NONNULL(machine), MR_INTERNAL, " null host name");
+ ASSERT(NONNULL(service), MR_INTERNAL, " null service name");
+ ASSERT((strlen(machine) + strlen(service) + 2 < BUFSIZ), MR_ARG_TOO_LONG,
+ " machine and service names");
+ sprintf(buf, "%s:%s", machine, service);
+ service_updated = strsave(buf);
+ ASSERT(NONNULL(service_updated), MR_NO_MEM, " for service name");
+ ASSERT((strlen(machine)+strlen(SERVICE_NAME)+2 < BUFSIZ), MR_ARG_TOO_LONG,
+ " machine and update service name");
+ sprintf(buf, "%s:%s", machine, SERVICE_NAME);
+ service_address = strsave(buf);
+ ASSERT(NONNULL(service_address), MR_NO_MEM, " for service address");
+ ASSERT(NONNULL(target_path), MR_INTERNAL, " null target pathname");
+ ASSERT((strlen(target_path) < MAXPATHLEN), MR_ARG_TOO_LONG,
+ " target pathname");
+ ASSERT2(target_path[0] == '/', MR_NOT_UNIQUE,
+ " non-absolute pathname supplied \"%s\"", target_path);
+ sprintf(buf, "%s/%s.out", DCM_DIR, service);
+ pathname = strsave(buf);
+ ASSERT(NONNULL(pathname), MR_NO_MEM, " for pathname");
+ ASSERT(NONNULL(instructions), MR_NO_MEM, " for instructions");
+ ASSERT((strlen(instructions) < MAXPATHLEN), MR_ARG_TOO_LONG,
+ " instruction pathname");