Fix build for WITH_TLS=no.

pull/2215/head
Roger A. Light 4 years ago
parent 214feb8f6b
commit b051b62251

@ -428,6 +428,7 @@ int config__parse_args(struct mosquitto__config *config, int argc, char *argv[])
}
i++;
}else if(!strcmp(argv[i], "--tls-keylog")){
#ifdef WITH_TLS
if(i<argc-1){
db.tls_keylog = mosquitto_strdup(argv[i+1]);
if(db.tls_keylog == NULL){
@ -439,6 +440,10 @@ int config__parse_args(struct mosquitto__config *config, int argc, char *argv[])
return MOSQ_ERR_INVAL;
}
i++;
#else
fprintf(stderr, "Error: TLS support not available so --tls-keylog is not available.\n");
return MOSQ_ERR_INVAL;
#endif
}else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")){
db.verbose = true;
}else{

@ -396,7 +396,9 @@ int main(int argc, char *argv[])
#endif
context__free_disused();
#ifdef WITH_TLS
mosquitto__free(db.tls_keylog);
#endif
db__close();
mosquitto_security_module_cleanup();

Loading…
Cancel
Save