]> rtime.felk.cvut.cz Git - orte.git/commit
JORTE: fix bug in subscriber callback
authorMartin Vajnar <martin@martin-HP-ProBook-4330s.(none)>
Tue, 8 Apr 2014 08:51:27 +0000 (10:51 +0200)
committerMartin Vajnar <martin@martin-HP-ProBook-4330s.(none)>
Tue, 8 Apr 2014 08:51:27 +0000 (10:51 +0200)
commita47dc687d045f69ee2ad881c7cfcbc5b426c65a7
treedf7044e79243fa17386624d4ce8e89c71c5677e5
parent2c8410c4861091475c244b8bdc5b82c620fb2baa
JORTE: fix bug in subscriber callback

This fixes a rarely occurring bug in subscriber callback.

When a Java subscriber is being destroyed, during the process
a JORTECallbackContext_t structure, used for storing pointers to Java objects,
was free()'d. If this occurred when new issue had arrived and was being
processed by the receive thread, then the pointer to the, now non-existent,
callback structure would have been dereferenced, leading to a SEGFAULT.

To fix this we now create a pointer to pointer to the specific structure
and pass this pointer to ORTESubcriptionCreate() and use it from the recvCallBack().
orte/libjorte/JORTESubscriptionCreate.c
orte/libjorte/JORTESubscriptionDestroy.c