alex.f - 2015-03-06
MyTest DEFINITIONS ::=
BEGIN
        Client ::= CHOICE {
        clientInt INTEGER,
        clientStr OCTET STRING,
        clientOID OBJECT IDENTIFIER
    }

END

Client_t newClient; 
printf("input integer: ");
      scanf("%d", &(newClient.choice.clientInt));

encode_rtn = der_encode_to_buffer(&asn_DEF_Client, &newClient,
                           send_buffer, BUFFER_SIZE);
if (encode_rtn.encoded == -1){
            printf("Error while encoding  %s: %s\n", encode_rtn.failed_type->name, strerror(errno));
            exit(1);
       }

Hi, there. This code can be compiled, but I always get "Client: Error 0" after I input an integer. What exactly is error 0?