problem with ver 1.1 unpack

  • Nobody/Anonymous


    I was playing around with the new oserl ver 1.1 and found it a considerable improvement over the 0.2 version.

    I encountered a problem through... when doing a bind_transceiver the pdu_syntax:unpack fun tries to unpack the pdu body on the bind_transceiver_resp with status 13, which is ESME_RBINDFAIL.

    The guard of the UnpackBody fun() checked for a CommandId of < 16#800000000 which is one 0 to many ... thus it will try to unpack the body for all commands.

    I don't know if my assesment is correct?

    • Enrique Marcote Peńa

      Thanks a lot for your report.  I missed that one.

      Indeed there's one 0 too many in pdu_syntax:pack/2 and pdu_syntax:unpack/2 guards ("CommandId < 16#800000000" should be "CommandId < 16#80000000"), or even better, that condition is unnecessary, if we assume that CommandStatus must always be 0 on request PDUs.

      You are completely right, having 16#800000000 instead of 16#80000000 weakens the condition.  Thanks for pointing that out.

      I've fixed it by simply removing that condition from the guard

           when CommandStatus == 0 ->

      You may download fixed pdu_syntax.erl from the CVS repository.\*checkout*/oserl/oserl/src/pdu_syntax.erl?rev=1.7

      Best regards,



Log in to post a comment.