version 1.18, 2004/08/03 04:58:45 |
version 1.19, 2004/08/04 13:26:02 |
|
|
return (0); |
return (0); |
} |
} |
|
|
#ifdef notyet |
|
/* |
/* |
* cvs_sendresp() |
* cvs_sendresp() |
* |
* |
* Send a response to the client of type <rid>, with optional arguments |
* Send a response of type <rid> to the client, with optional arguments |
* contained in <arg>, which should not be terminated by a newline. |
* contained in <arg>, which should not be terminated by a newline. |
* Returns 0 on success, or -1 on failure. |
* Returns 0 on success, or -1 on failure. |
*/ |
*/ |
|
|
cvs_sendresp(u_int rid, const char *arg) |
cvs_sendresp(u_int rid, const char *arg) |
{ |
{ |
int ret; |
int ret; |
size_t len; |
struct cvs_resp *resp; |
const char *resp; |
|
|
|
resp = cvs_resp_getbyid(rid); |
resp = cvs_resp_getbyid(rid); |
if (resp == NULL) { |
if (resp == NULL) { |
|
|
return (-1); |
return (-1); |
} |
} |
|
|
snprintf(cvs_proto_buf, sizeof(cvs_proto_buf), "%s %s\n", resp, |
ret = fputs(resp->resp_str, stdout); |
(arg == NULL) ? "" : arg); |
|
|
|
ret = fputs(resp, stdout); |
|
if (ret == EOF) { |
if (ret == EOF) { |
cvs_log(LP_ERRNO, "failed to send response to client"); |
cvs_log(LP_ERRNO, "failed to send response to client"); |
} |
} |
else { |
else { |
if (arg != NULL) |
if (arg != NULL) { |
ret = fprintf(stdout, " %s", arg); |
putc(' ', stdout); |
|
fputs(arg, stdout); |
|
} |
putc('\n', stdout); |
putc('\n', stdout); |
} |
} |
return (0); |
return (0); |
} |
} |
|
|
|
|
|
#ifdef notyet |
/* |
/* |
* cvs_getreq() |
* cvs_getreq() |
* |
* |