Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2248

[c] Codec pn_data_vfill() method doc has symbol and string types interchanged

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • proton-c-0.34.0
    • proton-c
    • None

    Description

      TheĀ pn_data_vfill() method in codec.c:571 has the symbol and string types interchanged. The function documentation states:

      /* Format codes:
         code: AMQP-type (arguments)
         ...
         S: symbol (char*)
         s: string (char*)
         ...
       */
      

      but uses these the other way around, ie s for symbol and S for string:

                if (code == 'S') {
                  err = pn_data_put_string(data, pn_bytes(size, start));
                } else {
                  err = pn_data_put_symbol(data, pn_bytes(size, start));
                }
      

      Guidance is needed on whether to fix the reversal and keep the stated codes, or reverse the codes.

      Attachments

        Activity

          People

            astitcher Andrew Stitcher
            kpvdr Kim van der Riet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: