version 1.1.2.2, 2011/12/20 16:04:34
|
version 1.1.2.3, 2011/12/24 17:30:29
|
Line 167 main(int argc, char **argv)
|
Line 167 main(int argc, char **argv)
|
} |
} |
|
|
printf("Connected ... "); |
printf("Connected ... "); |
switch ((ret = try2Connect(sock))) { | switch ((ret = ConnectClient(sock))) { |
case -1: |
case -1: |
printf(">> FAILED!\n"); |
printf(">> FAILED!\n"); |
break; |
break; |
Line 194 main(int argc, char **argv)
|
Line 194 main(int argc, char **argv)
|
if (ret == MQTT_RETCODE_ACCEPTED) { |
if (ret == MQTT_RETCODE_ACCEPTED) { |
ret = Publish(sock); |
ret = Publish(sock); |
shutdown(sock, SHUT_RDWR); |
shutdown(sock, SHUT_RDWR); |
} else | CloseClient(sock); |
| } else { |
| close(sock); |
ret = 3; |
ret = 3; |
|
} |
|
|
close(sock); |
|
args->free(args); |
args->free(args); |
free(args); |
free(args); |
return ret; |
return ret; |