summaryrefslogtreecommitdiff
path: root/src/tests/eldbus/eldbus_fake_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eldbus/eldbus_fake_server.c')
-rw-r--r--src/tests/eldbus/eldbus_fake_server.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tests/eldbus/eldbus_fake_server.c b/src/tests/eldbus/eldbus_fake_server.c
index 41d4b1f7a4..32f5b9bd17 100644
--- a/src/tests/eldbus/eldbus_fake_server.c
+++ b/src/tests/eldbus/eldbus_fake_server.c
@@ -153,12 +153,20 @@ _fake_server_property_set(const Eldbus_Service_Interface *iface,
153 ck_assert_ptr_ne(NULL, data); 153 ck_assert_ptr_ne(NULL, data);
154 154
155 if (strcmp(propname, FAKE_SERVER_WRITEONLY_PROPERTY) == 0) 155 if (strcmp(propname, FAKE_SERVER_WRITEONLY_PROPERTY) == 0)
156 eldbus_message_iter_arguments_get(iter, "i", &data->writeonly_property); 156 {
157 else 157 if (!eldbus_message_iter_arguments_get(iter, "i", &data->writeonly_property))
158 if (strcmp(propname, FAKE_SERVER_READWRITE_PROPERTY) == 0) 158 ck_abort_msg("error getting iter arguments on _fake_server_property_set");
159 eldbus_message_iter_arguments_get(iter, "i", &data->readwrite_property); 159 }
160 else 160 else
161 return eldbus_message_error_new(msg, "Invalid property", "Invalid property."); 161 {
162 if (strcmp(propname, FAKE_SERVER_READWRITE_PROPERTY) == 0)
163 {
164 if (!eldbus_message_iter_arguments_get(iter, "i", &data->readwrite_property))
165 ck_abort_msg("error getting iter arguments on _fake_server_property_set");
166 }
167 else
168 return eldbus_message_error_new(msg, "Invalid property", "Invalid property.");
169 }
162 170
163 return eldbus_message_method_return_new(msg); 171 return eldbus_message_method_return_new(msg);
164} 172}