Because there was a missing reply message in the socket communication.
Even if there is no reply data or fail case in the socket, It should send the reply message to prevent the client side's timeout.
This patch fixed the 5 sec delay of helper_agent when the helper_agent(IME) is relaunched
Change-Id: I0bab779ea508bd108005e7707de98e9105484d3e
Socket client_socket(client);
m_send_trans.write_to_socket(client_socket);
}
-private:
- static void send_fail_reply (int client_id)
+ void send_fail_reply (int client)
{
- Socket client_socket (client_id);
+ SCIM_DEBUG_MAIN(4) << __FUNCTION__ << " (" << client << ")\n";
+ LOGD ("client id:%d\n", client);
+
+ Socket client_socket (client);
Transaction trans;
trans.clear ();
trans.put_command (SCIM_TRANS_CMD_REPLY);
trans.write_to_socket (client_socket);
}
+private:
+
bool filter_event(int fd) {
SCIM_DEBUG_MAIN(1) << "PanelAgent::filter_event ()\n";
if (icit != m_start_helper_ic_index.end ()) {
m_panel_agent_manager.helper_attach_input_context_and_update_screen (client, icit->second, m_current_screen);
m_start_helper_ic_index.erase (icit);
+ result = true;
+ } else {
+ m_panel_agent_manager.send_fail_reply(client);
}
-
- result = true;
+ } else {
+ m_panel_agent_manager.send_fail_reply(client);
}
}
LOGW ("not implemented for %s", m_name.c_str ());
}
+void PanelAgentBase::send_fail_reply (int client)
+{
+ LOGW ("not implemented for %s", m_name.c_str ());
+}
} /* namespace scim */
/*
* @return none.
*/
virtual void set_prediction_allow (int client, uint32 context, String uuid, int mode);
+
+ /**
+ * @brief send_fail_reply.
+ *
+ * @param
+ *
+ * @return none.
+ */
+ virtual void send_fail_reply (int client);
+
};
/** @} */
_p->set_prediction_allow (id, context_id, uuid, mode);
}
+void PanelAgentManager::send_fail_reply (int id)
+{
+ PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
+
+ if (!_p.null ())
+ _p->send_fail_reply (id);
+}
+
} /* namespace scim */
/*
void remote_commit_string (int target_client, uint32 target_context, const WideString& wstr);
void remote_delete_surrounding_text (int client, uint32 context_id, uint32 offset, uint32 len);
void set_prediction_allow (int id, uint32 context_id, String uuid, int mode);
+ void send_fail_reply (int client);
};
/** @} */