[CDRIVER-56] socket fd <=0 should be <0 Created: 13/Apr/11  Updated: 19/Oct/16  Resolved: 14/Apr/11

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.3

Type: Bug Priority: Major - P3
Reporter: Kyle Banker Assignee: Kyle Banker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

> hi
> I found a problem in C driver.
>
> 122     conn->sock = socket( AF_INET, SOCK_STREAM, 0 );
> 123     if ( conn->sock <= 0 )

{ > 124         mongo_close_socket( conn->sock ); > 125         return mongo_conn_no_socket; > 126     }

>
> In this connection function, can the socket return descriptor be zero?
>



 Comments   
Comment by auto [ 14/Apr/11 ]

Author:

{u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}

Message: CDRIVER-56 fix for socket return check
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/93f478f6225b3f132518637e698f747a5f6f02ad

Comment by auto [ 14/Apr/11 ]

Author:

{u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}

Message: CDRIVER-56 fix for socket return check
Branch: dev
https://github.com/mongodb/mongo-c-driver/commit/93f478f6225b3f132518637e698f747a5f6f02ad

Generated at Wed Feb 07 21:08:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.