Register missing callback functions 20/269520/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 17 Jan 2022 22:30:17 +0000 (07:30 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 17 Jan 2022 22:30:17 +0000 (07:30 +0900)
The create callback function and the terminate callback function have to
be registered. If the create cb or the terminate cb is nullptr, the
registration function returns a negative error value that is
RPC_PORT_ERROR_INVALID_PARAMETER.

Change-Id: Ide9f53aa3939cf87f31b468ecaede0c517c0399f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
service_lib/autofill_service.c

index fdb7641..54be707 100644 (file)
@@ -451,6 +451,14 @@ static void __message_unregister(rpc_port_stub_AutofillSvcPort_context_h context
     __client_list = g_list_remove(__client_list, client);
     __destroy_client(client);
 }
+
+static void __autofill_service_create_cb(rpc_port_stub_AutofillSvcPort_context_h context, void *user_data)
+{
+}
+
+static void __autofill_service_terminate_cb(rpc_port_stub_AutofillSvcPort_context_h context, void *user_data)
+{
+}
 //LCOV_EXCL_STOP
 
 EXPORT_API int autofill_service_initialize(void)
@@ -460,8 +468,8 @@ EXPORT_API int autofill_service_initialize(void)
     int ret;
 
     rpc_port_stub_AutofillSvcPort_callback_s callback = {
-        NULL,
-        NULL,
+        __autofill_service_create_cb,
+        __autofill_service_terminate_cb,
         __message_register,
         __message_unregister,
         __auth_info_request_cb,