1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

iec61850-9-2: fix race

This commit is contained in:
Steffen Vogel 2017-11-18 01:54:06 +01:00
parent 614e994d48
commit 6c7a9302a1

View file

@ -215,7 +215,7 @@ int iec61850_sv_init(struct super_node *sn)
for (size_t i = 0; i < list_length(&receivers); i++) {
struct iec61850_sv_receiver *r = (struct iec61850_sv_receiver *) list_at(&receivers, i);
SVReceiver_start(r->receiver);
SVReceiver_startThreadless(r->receiver);
}
ret = pthread_create(&thread, NULL, iec61850_sv_thread, NULL);
@ -241,7 +241,7 @@ int iec61850_sv_deinit()
struct iec61850_sv_receiver *r = (struct iec61850_sv_receiver *) list_at(&receivers, i);
/* Stop all receivers */
SVReceiver_stop(r->receiver);
SVReceiver_stopThreadless(r->receiver);
/* Cleanup and free resources */
SVReceiver_destroy(r->receiver);