Created
August 18, 2017 15:11
-
-
Save Morozov-5F/fffd9c750d9ba070798293435a6fcc96 to your computer and use it in GitHub Desktop.
Azure connection status management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
s_azure_client_connection_status_cb( | |
IOTHUB_CLIENT_CONNECTION_STATUS result, | |
IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason, | |
void * ctx) | |
{ | |
const char * connection_results[] = | |
{ | |
"ONLINE", | |
"OFFLINE" | |
}; | |
const char * connection_reasons[] = | |
{ | |
"EXPIRED SAS TOKEN", | |
"DEVICE DISABLED", | |
"BAD CREDENTIAL", | |
"RETRY EXPIRED", | |
"NO NETWORK", | |
"COMMUNICATION ERROR", | |
"OK" | |
}; | |
UNUSED(ctx); | |
TRACE("Azure connection status: %s; reason: %s", | |
connection_results[result], connection_reasons[reason]); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment