bundle_get_str(envelope, "__AUL_RSP_RESOURCE_ID__", &id);
bundle_get_byte(envelope, "__AUL_RSP_SURFACE_ID__", (void **)&res_id, &sz);
bundle_get_byte(envelope, "__AUL_RSP_SURFACE_CREATOR_PID__", (void **)&pid, &sz);
- if (id) {
- surface = g_hash_table_lookup(__viewer_tbl, id);
- if (!surface) {
- _E("unknown surface");
- return 0;
- }
+
+ if (!id || !pid || !res_id) {
+ _E("bad tbm message received. missing arguments");
+ return 0;
}
- if (pid != NULL)
- surface->pid = (int)*pid;
+ surface = g_hash_table_lookup(__viewer_tbl, id);
+ if (!surface) {
+ _E("unknown surface");
+ return 0;
+ }
- if (res_id != NULL) {
- surface->resource_id = *res_id;
- surface->surface = tizen_remote_surface_manager_create_surface(__rsm,
+ surface->pid = (int)*pid;
+ surface->resource_id = *res_id;
+ surface->surface = tizen_remote_surface_manager_create_surface(__rsm,
(uint32_t)surface->resource_id, __tbm);
- __redirect_surface(surface);
- } else {
- _E("bad tbm message received. missing arguments");
- }
+ __redirect_surface(surface);
_D("__tbm_handler %d, %d, %s", surface->pid, surface->resource_id, id);
return 0;