All pastes #893951 Raw Edit

Unnamed

public text v1 · immutable
#893951 ·published 2008-02-06 16:01 UTC
rendered paste body
gboolean
io_callback(GIOChannel *ioch, GIOCondition cond, gpointer data)
{
  gsize bytes_read;
  gchar *msg;
  GError *err = NULL;
 GIOStatus ret;
  
printf("Entering Callback\n");
    ret = g_io_channel_read_line(ioch, &msg, &bytes_read, NULL, &err);

	if (ret == G_IO_STATUS_ERROR)
                g_error ("Error reading: %s\n", err->message);
    printf("Message: %s\n", msg);

  g_free(msg);
  return TRUE;
}