Diff for /mqtt/src/mqtt_pub.c between versions 1.1.2.1 and 1.1.2.2

version 1.1.2.1, 2011/12/20 15:03:42 version 1.1.2.2, 2011/12/20 16:04:34
Line 6 Line 6
   
 io_enableDEBUG;  io_enableDEBUG;
   
 sl_config cfg;  
 extern char compiled[], compiledby[], compilehost[];  extern char compiled[], compiledby[], compilehost[];
 static char szCfgName[MAXPATHLEN];  
   
 struct tagArgs *args;  struct tagArgs *args;
   
Line 30  Usage(void) Line 28  Usage(void)
                 "\t-P <password>\t\tPassword\n"                  "\t-P <password>\t\tPassword\n"
                 "\t-W <topic>\t\tWill Topic\n"                  "\t-W <topic>\t\tWill Topic\n"
                 "\t-M <message>\t\tWill Message\n"                  "\t-M <message>\t\tWill Message\n"
                 "\t-c <config>\t\tService config\n"  
                 "\t-v\t\t\tVerbose (more -vvv, more verbose)\n"                  "\t-v\t\t\tVerbose (more -vvv, more verbose)\n"
                 "\t-h\t\t\tHelp! This screen\n\n",                   "\t-h\t\t\tHelp! This screen\n\n", 
                 compiledby, compilehost, compiled);                  compiledby, compilehost, compiled);
Line 83  main(int argc, char **argv) Line 80  main(int argc, char **argv)
         AIT_SET_STR(&args->Pass, "");          AIT_SET_STR(&args->Pass, "");
   
         args->ka = MQTT_KEEPALIVE;          args->ka = MQTT_KEEPALIVE;
        strlcpy(szCfgName, DEFAULT_CONFIG, sizeof szCfgName);        while ((ch = getopt(argc, argv, "T:U:P:p:q:drCW:M:fvh")) != -1)
        while ((ch = getopt(argc, argv, "T:U:P:p:q:drCc:W:M:fvh")) != -1) 
                 switch (ch) {                  switch (ch) {
                         case 'T':                          case 'T':
                                 args->ka = (u_short) strtol(optarg, NULL, 0);                                  args->ka = (u_short) strtol(optarg, NULL, 0);
Line 128  main(int argc, char **argv) Line 124  main(int argc, char **argv)
                                 break;                                  break;
                         case 'f':                          case 'f':
                                 args->isFile++;                                  args->isFile++;
                                 break;  
                         case 'c':  
                                 strlcpy(szCfgName, optarg, sizeof szCfgName);  
                                 break;                                  break;
                         case 'v':                          case 'v':
                                 io_incDebug;                                  io_incDebug;

Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2


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