Revision c039490c Test/pschannel_bucket_test.c

View differences:

Test/pschannel_bucket_test.c
29 29
	struct pschannel_bucket * pb = NULL;
30 30
	uint8_t res;
31 31

  
32
	res = pschannel_bucket_insert(NULL, NULL, NULL, NULL, NULL);
32
	res = pschannel_bucket_insert(NULL, NULL, NULL, NULL, NULL, NULL);
33 33
	assert(res);
34 34

  
35 35
	pb = pschannel_bucket_new();
36
	res = pschannel_bucket_insert(pb, NULL, NULL, NULL, NULL);
36
	res = pschannel_bucket_insert(pb, NULL, NULL, NULL, NULL, NULL);
37 37
	assert(res);
38
	res = pschannel_bucket_insert(pb, NULL, "10.0.0.1", "8000", NULL);
38
	res = pschannel_bucket_insert(pb, NULL, "10.0.0.1", "8000", NULL, NULL);
39 39
	assert(res);
40 40

  
41
	res = pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps");
41
	res = pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps", "localhost/channel.sdp");
42 42
	assert(res == 0);
43 43

  
44 44
	pschannel_bucket_destroy(&pb);
......
57 57
	iter = pschannel_bucket_iter(pb, iter);
58 58
	assert(iter == NULL);
59 59

  
60
	pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps");
60
	pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps", "localhost/channel.sdp");
61 61
	iter = pschannel_bucket_iter(pb, iter);
62 62
	assert(iter);
63 63
	iter = pschannel_bucket_iter(pb, iter);
......
81 81
	assert(strcmp(s, "[]") == 0);
82 82
	free(s);
83 83

  
84
	pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps");
84
	pschannel_bucket_insert(pb, "channel1", "10.0.0.1", "8000", "1Mbps", "localhost/channel.sdp");
85 85
	s = pschannel_bucket_to_json(pb);
86 86
	assert(strcmp(s, "[{\"name\":\"channel1\",\"ipaddr\":\"10.0.0.1\",\"port\":\"8000\",\"quality\":\"1Mbps\"}]") == 0);
87 87
	free(s);
88 88

  
89
	pschannel_bucket_insert(pb, "channel2", "10.0.0.1", "8001", "1Mbps");
89
	pschannel_bucket_insert(pb, "channel2", "10.0.0.1", "8001", "1Mbps", "localhost/channel.sdp");
90 90
	s = pschannel_bucket_to_json(pb);
91 91
	assert(strcmp(s, "[{\"name\":\"channel1\",\"ipaddr\":\"10.0.0.1\",\"port\":\"8000\",\"quality\":\"1Mbps\"},{\"name\":\"channel2\",\"ipaddr\":\"10.0.0.1\",\"port\":\"8001\",\"quality\":\"1Mbps\"}]") == 0);
92 92
	free(s);

Also available in: Unified diff