X-Git-Url: https://git.cworth.org/git?p=loudgame;a=blobdiff_plain;f=lg-echo.c;h=c153472bb84f78ce8e1613086d0f90f0f3dcbaa9;hp=b6a48e8bf6aa018e2788013f5a4049ee3cd212b0;hb=HEAD;hpb=873cf1751a03edb58d4354721aff3e2691ac9f8c diff --git a/lg-echo.c b/lg-echo.c index b6a48e8..c153472 100644 --- a/lg-echo.c +++ b/lg-echo.c @@ -27,21 +27,7 @@ echo_handle_message (loudgame_t *lg, const char *peer, const char *message) { - LmMessage *reply; - gboolean result; - GError *error = NULL; - - reply = lm_message_new (peer, LM_MESSAGE_TYPE_MESSAGE); - - lm_message_node_add_child (reply->node, "body", message); - - result = lm_connection_send (lg->connection, reply, &error); - lm_message_unref (reply); - - if (! result) { - g_error ("lm_connection_send failed: error->message"); - loudgame_quit (lg, 1); - } + loudgame_send (lg, peer, message); } int