Diff for /mqtt/example/Attic/cmds.c between versions 1.1.2.10 and 1.1.2.13

version 1.1.2.10, 2011/12/05 14:11:47 version 1.1.2.13, 2011/12/05 22:17:39
Line 29  main() Line 29  main()
         }          }
         printf("++> KA=%d sec, ConnID=%s User=%s Pass=%s Will_Topic=%s Will_Message=%s\n", ka,           printf("++> KA=%d sec, ConnID=%s User=%s Pass=%s Will_Topic=%s Will_Message=%s\n", ka, 
                         cid, user, pass, topic, message);                          cid, user, pass, topic, message);
         getchar();  
         printf("connack=%d/%d\n", m->msg_len, mqtt_msgCONNACK(m, 1));          printf("connack=%d/%d\n", m->msg_len, mqtt_msgCONNACK(m, 1));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read connack=%d\n", mqtt_readCONNACK(m));
           getchar();
   
         /* pub* */          /* pub* */
         printf("publish=%d/%d\n", m->msg_len, mqtt_msgPUBLISH(m, "AAA/bbb/CCC/ddd", 7, 0, 2, 0, "OLE!!!", 7));          printf("publish=%d/%d\n", m->msg_len, mqtt_msgPUBLISH(m, "AAA/bbb/CCC/ddd", 7, 0, 2, 0, "OLE!!!", 7));
Line 41  main() Line 42  main()
         printf("puback=%d/%d\n", m->msg_len, mqtt_msgPUBACK(m, 10));          printf("puback=%d/%d\n", m->msg_len, mqtt_msgPUBACK(m, 10));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read puback=%d\n", mqtt_readPUBACK(m));
         printf("pubrec=%d/%d\n", m->msg_len, mqtt_msgPUBREC(m, 11));          printf("pubrec=%d/%d\n", m->msg_len, mqtt_msgPUBREC(m, 11));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read pubrec=%d\n", mqtt_readPUBREC(m));
         printf("pubrel=%d/%d\n", m->msg_len, mqtt_msgPUBREL(m, 12));          printf("pubrel=%d/%d\n", m->msg_len, mqtt_msgPUBREL(m, 12));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read pubrel=%d\n", mqtt_readPUBREL(m));
         printf("pubcomp=%d/%d\n", m->msg_len, mqtt_msgPUBCOMP(m, 13));          printf("pubcomp=%d/%d\n", m->msg_len, mqtt_msgPUBCOMP(m, 13));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read pubcomp=%d\n", mqtt_readPUBCOMP(m));
   
         /* sub* */          /* sub* */
         memset(s, 0, sizeof s);          memset(s, 0, sizeof s);
Line 74  main() Line 79  main()
         printf("unsuback=%d/%d\n", m->msg_len, mqtt_msgUNSUBACK(m, 10));          printf("unsuback=%d/%d\n", m->msg_len, mqtt_msgUNSUBACK(m, 10));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read unsuback=%d\n", mqtt_readUNSUBACK(m));
   
         /* ping* */          /* ping* */
         printf("pingreq=%d/%d\n", m->msg_len, mqtt_msgPINGREQ(m));          printf("pingreq=%d/%d\n", m->msg_len, mqtt_msgPINGREQ(m));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read pingreq=%d\n", mqtt_readPINGREQ(m));
         printf("pingresp=%d/%d\n", m->msg_len, mqtt_msgPINGRESP(m));          printf("pingresp=%d/%d\n", m->msg_len, mqtt_msgPINGRESP(m));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read pingresp=%d\n", mqtt_readPINGRESP(m));
   
         printf("disconnect=%d/%d\n", m->msg_len, mqtt_msgDISCONNECT(m));          printf("disconnect=%d/%d\n", m->msg_len, mqtt_msgDISCONNECT(m));
         for (i = 0; i < m->msg_len; i++)          for (i = 0; i < m->msg_len; i++)
                 printf("%d\n", ((u_char*) m->msg_base)[i]);                  printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("read disconnect=%d\n", mqtt_readDISCONNECT(m));
   
         mqtt_msgFree(&m, 42);          mqtt_msgFree(&m, 42);
         return 0;          return 0;

Removed from v.1.1.2.10  
changed lines
  Added in v.1.1.2.13


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>