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

-1 is returned on successful mongo_connect

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.6
    • Affects Version/s: 0.5.2
    • Component/s: None
    • Labels:
    • Environment:
      Oracle Linux 6, 64bit, standard packages only

      I'm calling simple mongo_connect(), but I get MONGO_ERROR back, even if the connection succeeds.

      (gdb) next
      904 if (replica_set)

      { (gdb) 920 mongo_servers->host, mongo_servers->port); (gdb) list 915 result = mongo_replset_connect(&wi->connection); 916 917 }

      else {
      918
      919 result = mongo_connect(&wi->connection,
      920 mongo_servers->host, mongo_servers->port);
      (gdb) next
      919 result = mongo_connect(&wi->connection,
      (gdb) print result
      $1 = 0x7fff
      (gdb) print wi->connection.err
      $2 = MONGO_CONN_SUCCESS

      I have to check connection->err irrespective of the return code from mongo_connect()

      The connection is, in fact, successful, I can send objects and everything.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            pawel Pawel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: