mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
2008-03-07 Jason Erickson <jerickso@stickpeople.com>
* psycopg/psycopgmodule.c (psyco_connect): fix off by one error in calculating the length of the DSN.
This commit is contained in:
parent
e55e2683cf
commit
89cadcb553
|
@ -1,3 +1,8 @@
|
||||||
|
2008-03-07 Jason Erickson <jerickso@stickpeople.com>
|
||||||
|
|
||||||
|
* psycopg/psycopgmodule.c (psyco_connect): fix off by one error in
|
||||||
|
calculating the length of the DSN.
|
||||||
|
|
||||||
2008-03-07 James Henstridge <james@jamesh.id.au>
|
2008-03-07 James Henstridge <james@jamesh.id.au>
|
||||||
|
|
||||||
* psycopg/pqpath.c (_pq_fetch_tuples): Don't call Python APIs
|
* psycopg/pqpath.c (_pq_fetch_tuples): Don't call Python APIs
|
||||||
|
|
|
@ -144,7 +144,7 @@ psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
|
||||||
PyOS_snprintf(port, 16, "%d", iport);
|
PyOS_snprintf(port, 16, "%d", iport);
|
||||||
|
|
||||||
if (dsn_static == NULL) {
|
if (dsn_static == NULL) {
|
||||||
size_t l = 45; /* len("dbname= user= password= host= port= sslmode=\0") */
|
size_t l = 46; /* len(" dbname= user= password= host= port= sslmode=\0") */
|
||||||
|
|
||||||
if (database) l += strlen(database);
|
if (database) l += strlen(database);
|
||||||
if (host) l += strlen(host);
|
if (host) l += strlen(host);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user