Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Java: Hopefully working HubListeners.
[doldaconnect.git]
/
lib
/
python
/
dolmod.c
diff --git
a/lib/python/dolmod.c
b/lib/python/dolmod.c
index
71623a6
..
1418174
100644
(file)
--- a/
lib/python/dolmod.c
+++ b/
lib/python/dolmod.c
@@
-1,6
+1,6
@@
/*
* Dolda Connect - Modular multiuser Direct Connect-style client
/*
* Dolda Connect - Modular multiuser Direct Connect-style client
- * Copyright (C) 2004 Fredrik Tolf
(fredrik@dolda2000.com)
+ * Copyright (C) 2004 Fredrik Tolf
<fredrik@dolda2000.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-189,11
+189,11
@@
static PyObject *mod_select(PyObject *self, PyObject *args)
return(NULL);
}
if(((pfd.revents & POLLIN) && dc_handleread()) || ((pfd.revents & POLLOUT) && dc_handlewrite())) {
return(NULL);
}
if(((pfd.revents & POLLIN) && dc_handleread()) || ((pfd.revents & POLLOUT) && dc_handlewrite())) {
- if(errno == 0) {
- fd = -1;
+ fd = -1;
+ if(errno == 0)
Py_RETURN_FALSE;
Py_RETURN_FALSE;
- }
PyErr_SetFromErrno(PyExc_OSError);
PyErr_SetFromErrno(PyExc_OSError);
+ return(NULL);
}
if(ret > 0)
Py_RETURN_TRUE;
}
if(ret > 0)
Py_RETURN_TRUE;
@@
-267,13
+267,13
@@
static PyObject *mod_qcmd(PyObject *self, PyObject *args, PyObject *kwargs)
if(PyMapping_HasKeyString(kwargs, "cb")) {
cb = PyMapping_GetItemString(kwargs, "cb");
if(PyCallable_Check(cb)) {
if(PyMapping_HasKeyString(kwargs, "cb")) {
cb = PyMapping_GetItemString(kwargs, "cb");
if(PyCallable_Check(cb)) {
- ret = PyInt_FromLong(dc_queuecmd(qcmd_cb, cb, cmd, L"%
%
a", toks, NULL));
+ ret = PyInt_FromLong(dc_queuecmd(qcmd_cb, cb, cmd, L"%a", toks, NULL));
} else {
PyErr_SetString(PyExc_TypeError, "Callback must be callable");
Py_DECREF(cb);
}
} else {
} else {
PyErr_SetString(PyExc_TypeError, "Callback must be callable");
Py_DECREF(cb);
}
} else {
- ret = PyInt_FromLong(dc_queuecmd(NULL, NULL, cmd, L"%
%
a", toks, NULL));
+ ret = PyInt_FromLong(dc_queuecmd(NULL, NULL, cmd, L"%a", toks, NULL));
}
out:
}
out:
@@
-402,7
+402,7
@@
static PyObject *mod_checkproto(PyObject *self, PyObject *args)
PyErr_SetString(PyExc_TypeError, "first argument must be a response object");
return(NULL);
}
PyErr_SetString(PyExc_TypeError, "first argument must be a response object");
return(NULL);
}
- resp = tmp;
+ resp =
(struct respobj *)
tmp;
if(dc_checkprotocol(resp->resp, version))
Py_RETURN_FALSE;
else
if(dc_checkprotocol(resp->resp, version))
Py_RETURN_FALSE;
else