diff --git a/devsupApp/src/dbfield.c b/devsupApp/src/dbfield.c index 90d5be8..01bba3c 100644 --- a/devsupApp/src/dbfield.c +++ b/devsupApp/src/dbfield.c @@ -249,7 +249,7 @@ static PyObject* pyField_putval(pyField *self, PyObject* args) { PyObject *val; void *rawfield; - rset *prset; + rset *prset = NULL; if(!PyArg_ParseTuple(args, "O", &val)) return NULL; @@ -327,10 +327,13 @@ static PyObject* pyField_putval(pyField *self, PyObject* args) } else { dest[0] = '\0'; } - if (self->addr.special == SPC_MOD) + if (self->addr.special == SPC_MOD) { /* This is needed for long string support. */ - if (prset = dbGetRset(&self->addr)) + prset = dbGetRset(&self->addr); + if (prset) { prset->special(&self->addr, 1); + } + } #if PY_MAJOR_VERSION >= 3 Py_DECREF(data); #endif diff --git a/pyIocApp/devsupMain.cpp b/pyIocApp/devsupMain.cpp index 17a2384..7ef82f0 100644 --- a/pyIocApp/devsupMain.cpp +++ b/pyIocApp/devsupMain.cpp @@ -205,7 +205,10 @@ int main(int argc, char *argv[]) iocsh(NULL); } else { if (loadedDb) { - epicsThreadExitMain(); + // non-interactive IOC. spin forever + while(true) { + epicsThreadSleep(1000.0); + } } else { printf("%s: Nothing to do!\n", arg0); usage(EXIT_FAILURE);