Revision 92a361ca src/streamer_creation_callback.c

View differences:

src/streamer_creation_callback.c
22 22
struct streamer_creation_callback {
23 23
	streamer_creation_handler_t callback;	
24 24
	const struct pstreamer * ps;
25
	const struct pschannel_bucket * psb;
25 26
	struct mg_connection *nc;
26 27
};
27 28

  
......
35 36
	return -1;
36 37
}
37 38

  
38
struct streamer_creation_callback * streamer_creation_callback_new(struct mg_connection *nc, streamer_creation_handler_t handler)
39
struct streamer_creation_callback * streamer_creation_callback_new(struct mg_connection *nc, const struct pschannel_bucket * psb, streamer_creation_handler_t handler)
39 40
{
40 41
	struct streamer_creation_callback * scc = NULL;
41 42

  
42
	if (nc && handler)
43
	if (nc && handler && psb)
43 44
	{
44 45
		scc = malloc(sizeof(struct streamer_creation_callback));
45 46
		scc->ps = NULL;
46 47
		scc->callback = handler;
47 48
		scc->nc = nc;
49
		scc->psb = psb;
48 50
	}
49 51
	return scc;
50 52
}
......
53 55
{
54 56
	int8_t res = -1;
55 57
	if (scc)
56
		res = scc->callback(scc->nc, scc->ps, ret);
58
		res = scc->callback(scc->nc, scc->psb, scc->ps, ret);
57 59
	return res;
58 60
}
59 61

  

Also available in: Unified diff