Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New dc_connect implementation
[doldaconnect.git]
/
lib
/
python
/
dolmod.c
diff --git
a/lib/python/dolmod.c
b/lib/python/dolmod.c
index
adf07a2
..
eb2c405
100644
(file)
--- a/
lib/python/dolmod.c
+++ b/
lib/python/dolmod.c
@@
-134,14
+134,13
@@
static struct respobj *makeresp(struct dc_response *resp)
static PyObject *mod_connect(PyObject *self, PyObject *args)
{
char *host;
static PyObject *mod_connect(PyObject *self, PyObject *args)
{
char *host;
- int port;
-
port = -1
;
- if(!PyArg_ParseTuple(args, "
s|i", &host, &por
t))
+
host = NULL
;
+ if(!PyArg_ParseTuple(args, "
|s", &hos
t))
return(NULL);
if(fd >= 0)
dc_disconnect();
return(NULL);
if(fd >= 0)
dc_disconnect();
- if((fd = dc_connect(host
, port
)) < 0) {
+ if((fd = dc_connect(host)) < 0) {
PyErr_SetFromErrno(PyExc_OSError);
return(NULL);
}
PyErr_SetFromErrno(PyExc_OSError);
return(NULL);
}