version 1.11, 2005/01/13 06:09:14 |
version 1.12, 2005/02/22 16:33:44 |
|
|
|
|
|
|
static int cvs_req_set (int, char *); |
static int cvs_req_set (int, char *); |
|
static int cvs_req_noop (int, char *); |
static int cvs_req_root (int, char *); |
static int cvs_req_root (int, char *); |
static int cvs_req_validreq (int, char *); |
static int cvs_req_validreq (int, char *); |
static int cvs_req_validresp (int, char *); |
static int cvs_req_validresp (int, char *); |
|
static int cvs_req_expandmod (int, char *); |
static int cvs_req_directory (int, char *); |
static int cvs_req_directory (int, char *); |
static int cvs_req_useunchanged (int, char *); |
static int cvs_req_useunchanged (int, char *); |
static int cvs_req_case (int, char *); |
static int cvs_req_case (int, char *); |
|
|
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ cvs_req_set }, |
{ cvs_req_set }, |
{ NULL }, |
{ cvs_req_expandmod }, |
{ cvs_req_command }, |
{ cvs_req_command }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
|
|
{ NULL }, |
{ NULL }, |
{ cvs_req_command }, |
{ cvs_req_command }, |
{ cvs_req_command }, |
{ cvs_req_command }, |
{ cvs_req_command }, |
{ cvs_req_noop }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
{ NULL }, |
|
|
return (*cvs_req_swtab[req->req_id].hdlr)(req->req_id, cp); |
return (*cvs_req_swtab[req->req_id].hdlr)(req->req_id, cp); |
} |
} |
|
|
|
/* |
|
* cvs_req_noop() |
|
*/ |
|
static int |
|
cvs_req_noop(int reqid, char *line) |
|
{ |
|
int ret; |
|
|
|
ret = cvs_sendresp(CVS_RESP_OK, NULL); |
|
if (ret < 0) |
|
return (-1); |
|
return (0); |
|
} |
|
|
|
|
static int |
static int |
cvs_req_root(int reqid, char *line) |
cvs_req_root(int reqid, char *line) |
{ |
{ |
|
|
if (cvs_req_rootpath != NULL) { |
if (cvs_req_rootpath != NULL) { |
cvs_log(LP_ERR, "duplicate Root request received"); |
cvs_log(LP_ERR, "duplicate Root request received"); |
return (-1); |
return (-1); |
|
|
return (0); |
return (0); |
} |
} |
|
|
|
|
/* |
/* |
|
* cvs_req_expandmod() |
|
* |
|
*/ |
|
static int |
|
cvs_req_expandmod(int reqid, char *line) |
|
{ |
|
int ret; |
|
|
|
ret = cvs_sendresp(CVS_RESP_OK, NULL); |
|
if (ret < 0) |
|
return (-1); |
|
return (0); |
|
} |
|
|
|
|
|
/* |
* cvs_req_useunchanged() |
* cvs_req_useunchanged() |
* |
* |
* Handler for the `UseUnchanged' requests. The protocol documentation |
* Handler for the `UseUnchanged' requests. The protocol documentation |
|
|
int ret; |
int ret; |
|
|
switch (reqid) { |
switch (reqid) { |
case CVS_REQ_NOOP: /* do nothing */ |
|
break; |
|
case CVS_REQ_VERSION: |
case CVS_REQ_VERSION: |
ret = cvs_sendresp(CVS_RESP_M, CVS_VERSION); |
ret = cvs_sendresp(CVS_RESP_M, CVS_VERSION); |
break; |
break; |
case CVS_REQ_ADD: |
case CVS_REQ_ADD: |
case CVS_REQ_ANNOTATE: |
case CVS_REQ_ANNOTATE: |
|
case CVS_REQ_CO: |
case CVS_REQ_CI: |
case CVS_REQ_CI: |
case CVS_REQ_DIFF: |
case CVS_REQ_DIFF: |
case CVS_REQ_LOG: |
case CVS_REQ_LOG: |