<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:34 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CDRIVER-140] -1 is returned on successful mongo_connect</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-140</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;I&apos;m calling simple mongo_connect(), but I get MONGO_ERROR back, even if the connection succeeds.&lt;/p&gt;


&lt;p&gt;(gdb) next&lt;br/&gt;
904	        if (replica_set) &lt;/p&gt;
{
(gdb) 
920	                    mongo_servers-&amp;gt;host, mongo_servers-&amp;gt;port);
(gdb) list
915	            result = mongo_replset_connect(&amp;amp;wi-&amp;gt;connection);
916	
917	        }
&lt;p&gt; else {&lt;br/&gt;
918	&lt;br/&gt;
919	            result = mongo_connect(&amp;amp;wi-&amp;gt;connection,&lt;br/&gt;
920	                    mongo_servers-&amp;gt;host, mongo_servers-&amp;gt;port);&lt;br/&gt;
(gdb) next&lt;br/&gt;
919	            result = mongo_connect(&amp;amp;wi-&amp;gt;connection,&lt;br/&gt;
(gdb) print result&lt;br/&gt;
$1 = 0x7fff&lt;br/&gt;
(gdb) print wi-&amp;gt;connection.err&lt;br/&gt;
$2 = MONGO_CONN_SUCCESS&lt;/p&gt;

&lt;p&gt;I have to check connection-&amp;gt;err irrespective of the return code from mongo_connect()&lt;/p&gt;

&lt;p&gt;The connection is, in fact, successful, I can send objects and everything.&lt;/p&gt;</description>
                <environment>Oracle Linux 6, 64bit, standard packages only</environment>
        <key id="39160">CDRIVER-140</key>
            <summary>-1 is returned on successful mongo_connect</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="kbanker">Kyle Banker</assignee>
                                    <reporter username="pawel">Pawel</reporter>
                        <labels>
                            <label>connection</label>
                    </labels>
                <created>Sat, 19 May 2012 08:02:51 +0000</created>
                <updated>Wed, 19 Oct 2016 14:14:52 +0000</updated>
                            <resolved>Fri, 1 Jun 2012 05:25:26 +0000</resolved>
                                    <version>0.5.2</version>
                                    <fixVersion>0.6</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="123764" author="pawel" created="Tue, 29 May 2012 08:44:06 +0000"  >&lt;p&gt;Verified in 0.6&lt;/p&gt;</comment>
                            <comment id="123256" author="kbanker" created="Fri, 25 May 2012 20:08:16 +0000"  >&lt;p&gt;Have not been able to reproduce this. Let us know if you can.&lt;/p&gt;</comment>
                            <comment id="121653" author="pawel" created="Mon, 21 May 2012 20:50:48 +0000"  >&lt;p&gt;I only have one node - it&apos;s a development system.&lt;br/&gt;
I checked isMaster flag:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;vps@druid&amp;#93;&lt;/span&gt;~/soft/mongodb-linux-x86_64-2.0.5$ ./bin/mongo xl4&lt;br/&gt;
MongoDB shell version: 2.0.5&lt;br/&gt;
connecting to: xl4&lt;br/&gt;
&amp;gt; db.isMaster();&lt;/p&gt;
{ &quot;ismaster&quot; : true, &quot;maxBsonObjectSize&quot; : 16777216, &quot;ok&quot; : 1 }
&lt;p&gt;&amp;gt; &lt;/p&gt;

&lt;p&gt;I don&apos;t have a test program, and 0.6 (I assume you made your changes to master only), has incompatible changes on write/inserts (with these &quot;concern&quot; things). I&apos;ll try to switch soon, and let you know how it went.&lt;/p&gt;
</comment>
                            <comment id="121532" author="kbanker" created="Mon, 21 May 2012 16:01:56 +0000"  >&lt;p&gt;Can you update your checkout and try again? I just fixed a related bug that may be causing this.&lt;/p&gt;

&lt;p&gt;Which version of MongoDB are you running? Are you connecting to a secondary or a primary? Can you connect to the shell and print the result of db.isMaster() here?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh6h3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13848</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>