Created
March 12, 2019 16:09
-
-
Save tanabarr/9cb9551d4c3626124649058d13d4ff74 to your computer and use it in GitHub Desktop.
src/mgmt/srv.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 static void | |
64 mgmt_drpc_handler(Drpc__Call *request, Drpc__Response **response) | |
65 { | |
66 Drpc__Response *drpc_resp = NULL; | |
67 // size_t len = 0; | |
68 | |
69 D_ALLOC_PTR(drpc_resp); | |
70 if (drpc_resp == NULL) { | |
71 D_ERROR("Failed to allocate drpc response\n"); | |
72 return; | |
73 } | |
74 | |
75 // char *body = "some nonsense\0"; | |
76 // len = sizeof(body); | |
77 | |
78 D_ERROR("init response\n"); | |
79 drpc__response__init(drpc_resp); | |
80 drpc_resp->sequence = request->sequence; | |
81 drpc_resp->status = DRPC__STATUS__SUCCESS; | |
82 | |
83 // drpc_resp->body.len = len; | |
84 // D_ALLOC(drpc_resp->body.data, len); | |
85 // memcpy(drpc_resp->body.data, body, len); | |
86 | |
87 *response = drpc_resp; | |
88 D_ERROR("response set in mgmt drpc hdlr\n"); | |
89 } | |
90 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment