dbTalk Databases Forums  

[BUGS] 7.3.4 patch for libpq SSL_read() problems?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] 7.3.4 patch for libpq SSL_read() problems? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian Lindauer
 
Posts: n/a

Default [BUGS] 7.3.4 patch for libpq SSL_read() problems? - 08-22-2003 , 01:27 PM






In 7.3.4, calls to PQconsumeInput() hang when connecting over SSL, but
this appears to be fixed at the head of the cvs tree. Is there a patch,
or set of patches, I can apply to 7.3.4 to fix just the SSL problems? I
tried applying the patch to fe-misc.c and fe-secure.c that Tom Lane
posted on August 4, 2003, but I still get the hang. Here's code to
reproduce the bug (though I'm pretty sure this is a known problem).

Thanks,
Brian


#include "libpq-fe.h"

int main(int argc, char **argv)
{
PGconn *conn = NULL;

if (!(conn = PQconnectdb("hostaddr=1.2.3.4 dbname=mydbname
user=myuser")))
{
fprintf(stderr, "Connect failed.\n");
goto error;
}

fprintf(stderr, "Will hang here if broken.\n");
PQconsumeInput(conn);
fprintf(stderr, "Not broken.\n");

PQfinish(conn);
conn = NULL;

return 0;

error:
if (conn)
{
PQfinish(conn);
conn = NULL;
}
return 1;
}



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.