<p>Implement the following codes in Application 2. Implement the <span style="font-family: Courier New,Courier,monospace">message_port_cb()</span> callback function for the <span style="font-family: Courier New,Courier,monospace">message_port_register_local_port()</span> function.</p>
<pre class="prettyprint">
-void message_port_cb(int local_port_id, const char *remote_app_id, bundle *message)
+void message_port_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data)
{
char *command = NULL;
char *data = NULL;
<pre class="prettyprint">
-void message_port_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message)
+void message_port_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data)
{
int ret;
<p>Register the local port in Application 1.</p>
<pre class="prettyprint">
-void message_port_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message)
+void message_port_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data)
{
char *result = NULL;
bundle_get_str(message, "result", &result);