This commit is contained in:
emanuel 2021-05-17 16:18:03 +01:00
parent 2b1026f0dc
commit 38172aa7a0
1 changed files with 5 additions and 3 deletions

View File

@ -35,8 +35,6 @@ int init(void* ctx) {
} }
int ra = zmq_bind(management_socket, "ipc:///tmp/itss/management"); int ra = zmq_bind(management_socket, "ipc:///tmp/itss/management");
printf("ra %d", ra);
fflush(stdout);
uint8_t buffer[2048]; uint8_t buffer[2048];
// Ignore first request (set) // Ignore first request (set)
@ -55,9 +53,11 @@ int init(void* ctx) {
if (dec.code) { if (dec.code) {
rv = 1; rv = 1;
printf(" FAIL: MREQ decode error\n"); printf(" FAIL: MREQ decode error\n");
fflush(stdout);
goto cleanup; goto cleanup;
} }
printf(" - Received MREQ\n"); printf(" - Received MREQ.get\n");
fflush(stdout);
ManagementReply_t* mrep = calloc(1, sizeof(ManagementReply_t)); ManagementReply_t* mrep = calloc(1, sizeof(ManagementReply_t));
switch (mreq->present) { switch (mreq->present) {
@ -119,6 +119,7 @@ int init(void* ctx) {
default: default:
rv = 1; rv = 1;
printf(" FAIL: MREQ. not GET (%d)\n", mreq->present); printf(" FAIL: MREQ. not GET (%d)\n", mreq->present);
fflush(stdout);
goto cleanup; goto cleanup;
} }
@ -126,6 +127,7 @@ int init(void* ctx) {
zmq_send(management_socket, buffer, enc.encoded, 0); zmq_send(management_socket, buffer, enc.encoded, 0);
printf(" OK\n"); printf(" OK\n");
fflush(stdout);
cleanup: cleanup:
ASN_STRUCT_FREE(asn_DEF_ManagementRequest, mreq); ASN_STRUCT_FREE(asn_DEF_ManagementRequest, mreq);