/* FIXME: Should not be global. */
SR_PRIV GIOChannel *channels[2];
-struct databag {
+struct context {
int pipe_fds[2];
uint8_t sample_generator;
uint8_t thread_running;
static void samples_generator(uint8_t *buf, uint64_t size, void *data)
{
static uint64_t p = 0;
- struct databag *ctx = data;
+ struct context *ctx = data;
uint64_t i;
/* TODO: Needed? */
/* Thread function */
static void thread_func(void *data)
{
- struct databag *ctx = data;
+ struct context *ctx = data;
uint8_t buf[BUFSIZE];
uint64_t nb_to_send = 0;
int bytes_written;
{
struct sr_datafeed_packet *packet;
struct sr_datafeed_header *header;
- struct databag *ctx;
+ struct context *ctx;
/* TODO: 'ctx' is never g_free()'d? */
- if (!(ctx = g_try_malloc(sizeof(struct databag)))) {
+ if (!(ctx = g_try_malloc(sizeof(struct context)))) {
sr_err("demo: %s: ctx malloc failed", __func__);
return SR_ERR_MALLOC;
}