Exemple #1
0
int	cometd_process_msg(const cometd* h, JsonNode* msg)
{
  cometd_ext_fire_incoming(h->exts, h, msg);

  char* channel = cometd_msg_channel(msg);
  int ret = cometd_fire_listeners(h, channel, msg);
  free(channel); 

  return ret;
}
Exemple #2
0
END_TEST

START_TEST (test_cometd_ext_fire_incoming)
{
  cometd_ext* ext = cometd_ext_new();
  ext->incoming = count_callback;
  cometd_ext_add(&exts, ext);
  cometd_ext_add(&exts, cometd_ext_new());

  cometd_ext_fire_incoming(exts, NULL, NULL);

  ck_assert_int_eq(1, count);
}