X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2Fdolmod.c;h=eb2c405defaa546209ec9478f3722cf760132883;hb=12383d48e624213114482f29af819ff77aef70fa;hp=adf07a24d53d95664229be4ea731035462b94df4;hpb=0c58c2a0a0792f1b40969242bf1a483cf6405889;p=doldaconnect.git diff --git a/lib/python/dolmod.c b/lib/python/dolmod.c index adf07a2..eb2c405 100644 --- 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; - int port; - port = -1; - if(!PyArg_ParseTuple(args, "s|i", &host, &port)) + host = NULL; + if(!PyArg_ParseTuple(args, "|s", &host)) 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); }