예제 #1
0
void
admin_process_request(struct response *rsp, struct request *req)
{
    switch (req->type) {
    case REQ_STATS:
        _admin_stats(rsp, req);
        break;
    case REQ_VERSION:
        _admin_version(rsp, req);
        break;
    default:
        rsp->type = RSP_INVALID;
        break;
    }
}
예제 #2
0
파일: process.c 프로젝트: huayl/pelikan
void
admin_process_request(struct response *rsp, struct request *req)
{
    rsp->type = RSP_GENERIC;

    switch (req->type) {
    case REQ_STATS:
        _admin_stats(rsp, req);
        break;
    case REQ_VERSION:
        rsp->data = str2bstr(VERSION_PRINTED);
        break;
    default:
        rsp->type = RSP_INVALID;
        break;
    }
}