version 1.1.2.6, 2012/05/08 11:45:57
|
version 1.1.2.7, 2012/05/27 10:04:05
|
Line 69 main(int argc, char **argv)
|
Line 69 main(int argc, char **argv)
|
register int i; |
register int i; |
struct timeval accu; |
struct timeval accu; |
|
|
if (!(args = malloc(sizeof(struct tagArgs)))) { | if (!(args = io_malloc(sizeof(struct tagArgs)))) { |
printf("Error:: in alloc arguments #%d - %s\n", errno, strerror(errno)); |
printf("Error:: in alloc arguments #%d - %s\n", errno, strerror(errno)); |
return 1; |
return 1; |
} else |
} else |
Line 79 main(int argc, char **argv)
|
Line 79 main(int argc, char **argv)
|
if (!(args->msg = mqtt_msgAlloc(USHRT_MAX))) { |
if (!(args->msg = mqtt_msgAlloc(USHRT_MAX))) { |
printf("Error:: in mqtt buffer #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
printf("Error:: in mqtt buffer #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
return 1; |
return 1; |
} |
} |
|
|
Line 113 main(int argc, char **argv)
|
Line 113 main(int argc, char **argv)
|
case 'h': |
case 'h': |
default: |
default: |
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
Usage(); |
Usage(); |
return 1; |
return 1; |
} |
} |
Line 122 main(int argc, char **argv)
|
Line 122 main(int argc, char **argv)
|
if (argc < 2) { |
if (argc < 2) { |
printf("Error:: host for connect not found or connection id!\n\n"); |
printf("Error:: host for connect not found or connection id!\n\n"); |
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
Usage(); |
Usage(); |
return 1; |
return 1; |
} else { |
} else { |
Line 132 main(int argc, char **argv)
|
Line 132 main(int argc, char **argv)
|
if (!io_gethostbyname(*argv, port, &args->addr)) { |
if (!io_gethostbyname(*argv, port, &args->addr)) { |
printf("Error:: host not valid #%d - %s\n", io_GetErrno(), io_GetError()); |
printf("Error:: host not valid #%d - %s\n", io_GetErrno(), io_GetError()); |
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
Usage(); |
Usage(); |
return 1; |
return 1; |
} |
} |
Line 141 main(int argc, char **argv)
|
Line 141 main(int argc, char **argv)
|
|
|
if (!(args->cli = mqtt_cli_Open(&args->addr.sa, args->ka))) { |
if (!(args->cli = mqtt_cli_Open(&args->addr.sa, args->ka))) { |
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
return 2; |
return 2; |
} |
} |
|
|
Line 184 main(int argc, char **argv)
|
Line 184 main(int argc, char **argv)
|
mqtt_cli_Close(&args->cli); |
mqtt_cli_Close(&args->cli); |
|
|
args->free(args); |
args->free(args); |
free(args); | io_free(args); |
return ret; |
return ret; |
} |
} |