Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2272

mongoc_server_description_t tags and compressors improperly reinitialized

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.1
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      Whenever a mongoc_server_description_t struct is reset, it zeroes all fields that are declared after "set_name". This makes "tags" and "compressors" invalid. If the server reports any tags or compressors in its ismaster reply then these fields are set correctly, otherwise they remain invalid.

      The solution is to avoid the hack of zeroing all fields declared after set_name. Factor out a function that explicitly resets each field, and call that function from mongoc_server_description_init and mongoc_server_description_reset.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: