mongoc_server_description_t tags and compressors improperly reinitialized

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.8.1
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: