Skip to content

Commit

Permalink
Fix mosquitto_string_option(, MOSQ_OPT_TLS_KEYFORM, ) return value
Browse files Browse the repository at this point in the history
`mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.

Closes #1360. Thanks to Michael Dombrowski.
  • Loading branch information
ralight committed Jul 30, 2019
1 parent 42237c0 commit f21ccc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Expand Up @@ -13,6 +13,9 @@ Client library:
- Make behaviour of `mosquitto_connect_async()` consistent with
`mosquitto_connect()` when connecting to a non-existent server.
Closes #1345.
- `mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.
Closes #1360.

Clients:
- mosquitto_pub: fix error codes not being returned when mosquitto_pub exits.
Expand Down
3 changes: 1 addition & 2 deletions lib/options.c
Expand Up @@ -289,6 +289,7 @@ int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, cons
}else{
return MOSQ_ERR_INVAL;
}
return MOSQ_ERR_SUCCESS;
#else
return MOSQ_ERR_NOT_SUPPORTED;
#endif
Expand Down Expand Up @@ -322,8 +323,6 @@ int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, cons
default:
return MOSQ_ERR_INVAL;
}

return MOSQ_ERR_INVAL;
}


Expand Down

0 comments on commit f21ccc3

Please sign in to comment.