Fix: caput quits when connection fails (catools)

This commit is contained in:
Ralph Lange
2009-04-03 19:46:32 +00:00
parent cc4b462f8c
commit 2e8595f17f

View File

@@ -379,7 +379,11 @@ int main (int argc, char *argv[])
pvs[0].name = argv[optind] ; /* Copy PV name from command line */
connect_pvs(pvs, nPvs);
result = connect_pvs(pvs, nPvs); /* If the connection fails, we're done */
if (result) {
ca_context_destroy();
return result;
}
/* Get values from command line */
optind++;