+ /* Store the callback on a thread basis to be handled for each client */\r
+ DRM_CLIENT_LOG("Callback = %p", ((drm_initiator_info_s*) (client_in->fixed_data.request_data))->operation_callback.callback);\r
+ DRM_CLIENT_LOG("Client id = %d", client_info.client_id);\r
+\r
+ if (((drm_initiator_info_s*) (client_in->fixed_data.request_data))->operation_callback.callback) {\r
+ /* Callback present, store if not yet stored\r
+ * Loop through the list checking for client id if stored */\r
+ int loop = 0;\r
+ for (; loop < DRM_MAX_CLIENT_SUPPORTED; loop++) {\r
+ if (client_cb_info[loop].client_id == client_info.client_id) {\r
+ DRM_CLIENT_LOG("Callback info already stored!!, client_id[%d] = %d",\r
+ loop, client_cb_info[loop].client_id);\r
+ break;\r
+ } else if (client_cb_info[loop].client_id == 0) {\r
+ DRM_CLIENT_LOG("No entry for cb yet, loop = %d", loop);\r
+ DRM_CLIENT_LOG("Empty structure, storing client callback here, id = %d", client_info.client_id);\r
+ client_cb_info[loop].client_id = client_info.client_id;\r
+ memcpy(&client_cb_info[loop].operation_callback,\r
+ &(((drm_initiator_info_s*) (client_in->fixed_data.request_data))->operation_callback),\r
+ sizeof(drm_operation_cb_s));\r
+ break;\r
+ }\r
+ }\r
+ if (DRM_MAX_CLIENT_SUPPORTED == loop) {\r
+ DRM_CLIENT_LOG("loop = %d, Maximum clients reached!!!", loop);\r
+ }\r
+ }\r
+\r