Login StatusMsg in ETA MRN tutorial

Hello,

I received the following message from the tutorialMRN provided in C language.

Received Login StatusMsg

State: Closed / Suspect / User unknown to permission system, it could be DACS, AAA or EED - text: "[my server host name], unknown to system"

I already got a DACS ID.

How should I use this?

Best Answer

  • Hi @noblerain72

    By default, the example uses your system login credentials as username. Please see the prior tutorial.

    You will have to override the default credentials with you DACS ID.

    char dacsID[] = "MY_DACS_ID";
    ...
    void init()
    {
    ...
    if (rsslInitDefaultRDMLoginRequest(&loginRequest, 1) != RSSL_RET_SUCCESS)
    {
    printf("rsslInitDefaultRDMLoginRequest() failed\n");
    cleanUpAndExit(-1);
    }
    strcpy(loginRequest.userName.data,dacsID);
    loginRequest.userName.length = strlen(dacsID);
    ...
    }

Answers

  • Hi @noblerain72,

    Did you try to include your DACS user name here:

    image

    Depending on how your DACS system is setup, you may also need to include your .position() and/or .applicationId() in addition to your username. These are additional methods on the OmmConsumer().

  • @noblerain72

    loginRequest.userName is a RsslBuffer.

    typedef struct
    {
    rtrUInt32 length; /*!< The length of the buffer. */
    char *data; /*!< The actual data buffer. */
    } RwfBuffer;
    <br>

    It needs to populate both data (char *) and length (int32).

    The code should be:

    char dacsID[] = "MY_DACS_ID";
    ...
    void init()
    {
    ...
    if
    (rsslInitDefaultRDMLoginRequest(&loginRequest, 1) != RSSL_RET_SUCCESS)
    {
    printf("rsslInitDefaultRDMLoginRequest() failed\n");
    cleanUpAndExit(-1);
    }
    loginRequest.userName.data = &dacsID[0];
    loginRequest.userName.length = strlen(dacsID);
    ...
    }