Eina Debug: fix a bug resulting in registering opcodes twice
authorDaniel Zaoui <daniel.zaoui@yahoo.com>
Thu, 8 Jun 2017 22:09:38 +0000 (01:09 +0300)
committerDaniel Zaoui <daniel.zaoui@yahoo.com>
Sun, 11 Jun 2017 06:44:57 +0000 (09:44 +0300)
commit0e947166aa8e9e09e5d61a0eef2857fd522e8924
treeda8cea125d7ff5f556958eabc5b69128ab1e54aa
parentafb0add3451fad38ea2727b658846d41ddf914d5
Eina Debug: fix a bug resulting in registering opcodes twice

The opcodes registration request is sent directly in case the connection
is already made. Otherwise, the request is waiting for the connection to
be made by the dedicated thread (not the main loop).
That's why the request can be sent by the two different threads at the
same time, leading to send it twice. It means a callback for an opcode
would be invoked twice everytime a request with this opcode is received.

This patch fixes it by checking if the request has already been sent.
src/lib/eina/eina_debug.c