mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-16 13:04:55 +03:00
support for resource descriptions
This commit is contained in:
1 parent
ea052d4a1a
commit
efb6414291
2 files changed
+5
-2
No files matched your search
+4
-2
@@ -179,8 +179,10 @@ coap_check_subscriptions(coap_context_t *context) {
|
||||
|
||||
void
|
||||
coap_free_resource(void *res) {
|
||||
if ( res )
|
||||
coap_free( ((coap_resource_t *)res)->uri );
|
||||
if ( res ) {
|
||||
coap_free(((coap_resource_t *)res)->uri);
|
||||
coap_delete_string(((coap_resource_t *)res)->name);
|
||||
}
|
||||
}
|
||||
|
||||
coap_key_t
|
||||
|
||||
@@ -35,6 +35,7 @@ typedef unsigned long coap_key_t;
|
||||
|
||||
typedef struct {
|
||||
coap_uri_t *uri; /* unique identifier; memory is released by coap_delete_resource() */
|
||||
str *name; /* display name of the resource */
|
||||
unsigned char mediatype; /* media type for resource representation */
|
||||
unsigned int dirty:1; /* set to 1 if resource has changed */
|
||||
unsigned int writable:1; /* set to 1 if resource can be changed using PUT */
|
||||
|
||||
Reference in new issue
Block a user