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

mongoc_client_get_database_names does not set error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2-beta0
    • Affects Version/s: 1.1.4
    • Component/s: libmongoc
    • None

      mongoc_client_get_database_names does not set the bson_error_t struct or return NULL even if an error is encountered.

      If I change mongoc-client.c:1316 to:

         if (!ret && !mongoc_cursor_error(cursor, error)) {
      

      then it looks like the error is set.

      A simple test case is connecting with an invalid user/pwd, then calling mongoc_client_get_database_names (should return NULL).

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

              Created:
              Updated:
              Resolved: