projects
/
platform
/
core
/
uifw
/
libtdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddc5e40
)
client: not allow adding handler twicenot allow
54/171054/2
author
Boram Park
<boram1288.park@samsung.com>
Mon, 26 Feb 2018 02:15:24 +0000
(11:15 +0900)
committer
Boram Park
<boram1288.park@samsung.com>
Mon, 26 Feb 2018 23:50:59 +0000
(08:50 +0900)
Change-Id: Ibc42a95295638ccc87aba5eb6999ef73664be7b2
client/tdm_client.c
patch
|
blob
|
history
diff --git
a/client/tdm_client.c
b/client/tdm_client.c
index
41a5fe2
..
468d984
100644
(file)
--- a/
client/tdm_client.c
+++ b/
client/tdm_client.c
@@
-751,6
+751,13
@@
tdm_client_output_add_change_handler(tdm_client_output *output,
private_output = (tdm_private_client_output*)output;
private_client = private_output->private_client;
+ LIST_FOR_EACH_ENTRY(h, &private_output->change_handler_list, link) {
+ if (h->func == func && h->user_data == user_data) {
+ TDM_ERR("can't add twice");
+ return TDM_ERROR_BAD_REQUEST;
+ }
+ }
+
h = calloc(1, sizeof *h);
TDM_RETURN_VAL_IF_FAIL(h != NULL, TDM_ERROR_OUT_OF_MEMORY);