X-Git-Url: https://git.cworth.org/git?p=loudgame;a=blobdiff_plain;f=lg-echo.c;h=c153472bb84f78ce8e1613086d0f90f0f3dcbaa9;hp=b6a48e8bf6aa018e2788013f5a4049ee3cd212b0;hb=1b9383bc1758fa4b49ab029c730b7ba434b0f7ad;hpb=067f67d8b3d5b4a05c406f23e8129eb08413eb2f 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