Skip to content
Snippets Groups Projects
Commit 552d01c6 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

bugfix: do not call seq_monitor in pvAssign but reset dbch->monid [amended for branch-2-2]

The problem was a call seq_monitor(ch, FALSE) inside pvAssign after we
destroy the channel (if one exists). This will always fail (strange I
never noticed that) and as a result dbch->monid would not be reset to
NULL. That in turn means when the channel is re-assigned and connects,
seq_monitor(ch, TRUE) will not do anything because it thinks there is
already a valid subscription.

The fix is to remove the call and instead only reset dbch->monid to NULL.
parent 8d862cd0
No related branches found
No related tags found
No related merge requests found
......@@ -626,10 +626,13 @@ epicsShareFunc pvStat seq_pvAssign(SS_ID ss, VAR_ID varId, const char *pvName)
dbch->connected = FALSE;
sp->connectCount--;
if (ch->monitored)
{
seq_camonitor(ch, FALSE);
}
/* Must not call seq_camonitor(ch, FALSE), it would give an
error because channel is already dead. pvVarDestroy takes
care that the monid inside the pvid gets invalidated. */
/* Note ch->monitored remains on because it is a configuration
value that belongs to the variable and newly created channels
for the same variable should inherit this configuration. */
}
if (status != pvStatOK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment