summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2021-07-26 19:39:47 +0100
committerAlastair Poole <netstar@gmail.com>2021-07-26 19:39:47 +0100
commit1d888c9d61e2a0ab51244228b90ce3c06bfd9385 (patch)
tree54b953ee4556bc49808b743273e9bf1f2162499c
parent8090638df587ea486bc434ef43f9af03a0f29b1e (diff)
delay: dont use static...
-rw-r--r--src/bin/client/client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/client/client.c b/src/bin/client/client.c
index 418876f..8912a67 100644
--- a/src/bin/client/client.c
+++ b/src/bin/client/client.c
@@ -1091,16 +1091,18 @@ event_broadcast(Client *client)
1091 { 1091 {
1092 if ((client->event_record_delay.callback) && (callback_fire(client))) 1092 if ((client->event_record_delay.callback) && (callback_fire(client)))
1093 { 1093 {
1094 static uint32_t delay; 1094 uint32_t *delay = malloc(sizeof(uint32_t));
1095 EINA_SAFETY_ON_NULL_RETURN(delay);
1095 1096
1096 delay = client->header.time - client->snapshot.time; 1097 *delay = client->header.time - client->snapshot.time;
1097 Client_Event *ev = event_create(client, &delay); 1098 Client_Event *ev = event_create(client, delay);
1098 if (ev) 1099 if (ev)
1099 { 1100 {
1100 client->event_record_delay.callback(client, ev, 1101 client->event_record_delay.callback(client, ev,
1101 client->event_record_delay.data); 1102 client->event_record_delay.data);
1102 free(ev); 1103 free(ev);
1103 } 1104 }
1105 free(delay);
1104 } 1106 }
1105 client->snapshot.last_record = 0; 1107 client->snapshot.last_record = 0;
1106 } 1108 }