Message388268
I have a c function to encrypt values which returns an array of bytes. The function returns proper values outside of python. When used as a python function, the result is incomplete usually 10-20% of the time. If I add a sleep(1) call before returning from the function, my success rate goes to 100%. While this works, it is unacceptable as it will create enormous latency in my application.
static PyObject *method_encrypt(PyObject *self, PyObject *args) {
char *keyval, *str = NULL, output[512];
Py_ssize_t count=0;
PyObject *retval;
if(!PyArg_ParseTuple(args, "ss", &str, &keyval)) {
return NULL;
}
encryptBlowfishCfb(str, &count, output, keyval);
retval = Py_BuildValue("y#", output, count);
//sleep(1);
return retval;
} |
|
Date |
User |
Action |
Args |
2021-03-08 15:31:33 | dwoodjunkmail | set | recipients:
+ dwoodjunkmail |
2021-03-08 15:31:33 | dwoodjunkmail | set | messageid: <1615217493.05.0.795009945001.issue43435@roundup.psfhosted.org> |
2021-03-08 15:31:33 | dwoodjunkmail | link | issue43435 messages |
2021-03-08 15:31:32 | dwoodjunkmail | create | |
|