Fix Frame Broker 15/230715/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 13 Apr 2020 23:28:55 +0000 (08:28 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 13 Apr 2020 23:28:55 +0000 (08:28 +0900)
Frame Broker invokes the error callback directly when the error is delivered
from Display Server before sending the launch request.

Change-Id: I232b06532f70856903d8ea1ba6c2e222bf689a20
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
frame-broker/include/frame_context.h
frame-broker/src/frame_broker.c

index f73d6c4..042b9ba 100644 (file)
@@ -102,6 +102,7 @@ typedef void (*frame_context_destroy_cb)(frame_context_h context,
  * @param[in]   user_data       The user data passed from frame_broker_create() function
  *
  * @see frame_context_error_e
+ * @remarks The context handle can be NULL pointer when the error is delivered from Display Server before sending the launch request.
  */
 typedef void (*frame_context_error_cb)(frame_context_h context,
                frame_context_error_e error,
index 2920d2a..ac1462f 100644 (file)
@@ -244,7 +244,9 @@ static void __scls_error_cb(screen_connector_launcher_service_error_e error,
                        __check_pre_context(broker);
                        context = broker->context;
                } else {
-                       _E("Invalid context");
+                       _W("Invoke error callback directly");
+                       broker->callback.error(NULL, __convert_error(error),
+                                       broker->user_data);
                        return;
                }
        }