Qpid
  1. Qpid
  2. QPID-2896

Incorrect detection of data types in address parameters - C++ client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: C++ Client
    • Labels:
      None

      Description

      Numeric values in address parameters are incorrectly interpreted as strings. The following address, run on the c++ client, causes the problem:

      my-queue;{create:always,node:{type:queue,x-declare:{arguments:{'qpid.max_count':60}}}}

      Reproducer:

      $ drain "my-queue;{create:always,node:{type:queue,x-declare:{arguments:{'qpid.max_count':60}}}}"
      $ qpid-config queues
      Queue Name Attributes
      ======================================================================
      my-queue Failed: TypeError: %d format: a number is required, not str

      No only does qpid-config misinterpret the value of the 'qpid.max_count' field, but the broker does as well (i.e. the limit on the queue remains the default).

      Note that this works properly when using the Python API. It is an inconsistency in the way addresses are parsed and encoded with Python doing it correctly.

        Issue Links

          Activity

          Ted Ross created issue -
          Ted Ross made changes -
          Field Original Value New Value
          Link This issue is duplicated by QPID-2908 [ QPID-2908 ]
          Jonathan Robie made changes -
          Assignee Jonathan Robie [ jonathan.robie ]
          Hide
          Jonathan Robie added a comment -

          Revision 1028346 modifies the broker so that invalid values for max_count or max_size are rejected - previously, the default value was used. It now accepts either non-negative integers or string values containing the lexical representation of non-negative integers.

          Show
          Jonathan Robie added a comment - Revision 1028346 modifies the broker so that invalid values for max_count or max_size are rejected - previously, the default value was used. It now accepts either non-negative integers or string values containing the lexical representation of non-negative integers.
          Hide
          Jonathan Robie added a comment -

          Resolved in revision 1028860.

          Recognizes integer, floating point, Boolean, and string constants.

          Added Variant::fromString() to parse strings containing the lexical representation of simple types.

          Show
          Jonathan Robie added a comment - Resolved in revision 1028860. Recognizes integer, floating point, Boolean, and string constants. Added Variant::fromString() to parse strings containing the lexical representation of simple types.
          Jonathan Robie made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Jonathan Robie
              Reporter:
              Ted Ross
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development