void CProxyBodyGen::GenTypedefProxyDelegate(std::ofstream& stream) {
const char format[] =
- "typedef void (*proxy_delegate)(GList **list, rpc_port_parcel_h parcel, int seq_id);\n";
+ "typedef void (*proxy_delegate)(GList **list, rpc_port_parcel_h parcel, int seq_id, int id);\n";
stream << NLine(1);
stream << std::string(format);
}
const char CB_DELEGATE_INVOKER[] =
R"__c_cb(
-static void __$$_delegate_$$(GList **list, rpc_port_parcel_h parcel, int seq_id)
+static void __$$_delegate_$$(GList **list, rpc_port_parcel_h parcel, int seq_id, int id)
{
$$
do {
iter = *list;
while (iter) {
handle = (struct ##_s *)iter->data;
- if (handle->seq_id == seq_id) {
+ if (handle->seq_id == seq_id && handle->id == id) {
$$
if (handle->once) {
*list = g_list_remove_link(*list, iter);
if (id > 0 && id < (sizeof(__##_delegate_table) / sizeof(__##_delegate_table[0]))) {
if (__##_delegate_table[id])
- __##_delegate_table[id](list, parcel, seq_id);
+ __##_delegate_table[id](list, parcel, seq_id, id);
} else {
dlog_print(DLOG_WARN, LOG_TAG, "Unknown id(%d)", id);
}