Skip to content

Commit

Permalink
Implement mg_rpc_get_channel_info()
Browse files Browse the repository at this point in the history
Also rename `struct mg_rpc_authn` to `struct mg_rpc_authn_info`, for consistency.

PUBLISHED_FROM=41d7eb0a2b56c13dbe947bd92a7e2d0ba4afff50
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Dec 15, 2017
1 parent 8a41810 commit 3e54238
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mgos_rpc_channel_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ static const char *mg_rpc_channel_mqtt_get_type(struct mg_rpc_channel *ch) {
return "MQTT";
}

static bool mg_rpc_channel_mqtt_get_authn_info(struct mg_rpc_channel *ch,
const char *auth_domain,
const char *auth_file,
struct mg_rpc_authn *authn) {
static bool mg_rpc_channel_mqtt_get_authn_info(
struct mg_rpc_channel *ch, const char *auth_domain, const char *auth_file,
struct mg_rpc_authn_info *authn) {
(void) ch;
(void) auth_domain;
(void) auth_file;
Expand Down Expand Up @@ -170,7 +169,8 @@ struct mg_rpc_channel *mg_rpc_channel_mqtt(const struct mg_str device_id) {
}

bool mgos_rpc_mqtt_init(void) {
if (mgos_rpc_get_global() != NULL && mgos_sys_config_get_rpc_mqtt_enable()) {
if (mgos_rpc_get_global() != NULL && mgos_sys_config_get_rpc_mqtt_enable() &&
mgos_sys_config_get_mqtt_enable()) {
struct mg_rpc_channel *mch =
mg_rpc_channel_mqtt(mg_mk_str(mgos_sys_config_get_device_id()));
if (mch == NULL) return MGOS_INIT_MG_RPC_FAILED;
Expand Down

0 comments on commit 3e54238

Please sign in to comment.