uri.[hc]: improved support for 'coaps' URI scheme

This commit is contained in:
Olaf Bergmann committed 2016-04-08 15:14:20 +02:00
1 parent 5180ae3753
commit 3a127a3816
2 files changed
+24

No files matched your search

+4
View File
@@ -74,6 +74,10 @@ coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri) {
/* There might be an additional 's', indicating the secure version: */
if (len && (secure = tolower(*p) == 's')) {
++p; --len;
uri->scheme = COAP_URI_SCHEME_COAPS;
uri->port = COAPS_DEFAULT_PORT;
} else {
uri->scheme = COAP_URI_SCHEME_COAP;
}
q = (unsigned char *)"://";