Annotation of mqtt/example/test.c, revision 1.1.2.3
1.1.2.1 misho 1: #include <stdio.h>
2: #include <stdlib.h>
3: #include <string.h>
4: #include <sys/types.h>
5: #include "aitmqtt.h"
6:
7:
8: int
9: main(int argc, char **argv)
10: {
1.1.2.2 misho 11: mqtt_subscr_t *v, *p;
12: u_char qoses[] = { 1, 0, 2, 6, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0 };
1.1.2.1 misho 13:
14: if (argc < 2)
15: return 1;
16:
1.1.2.2 misho 17: v = mqtt_str2sub((const char**) argv, 0, qoses);
18: for (p = v; p->sub_data; p++)
19: printf("msb=%hhd lsb=%hhd val=%hd %s qos=%d\n",
20: p->sub_sb.sb.m, p->sub_sb.sb.l, p->sub_sb.val, p->sub_data, p->sub_qos);
1.1.2.3 ! misho 21: mqtt_freeSub(&v, 42);
1.1.2.1 misho 22:
23: return 0;
24: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>