support for resource descriptions

This commit is contained in:
Olaf Bergmann committed 2010-10-23 23:18:44 +02:00
1 parent ea052d4a1a
commit efb6414291
2 files changed
+5 -2

No files matched your search

+4 -2
View File
@@ -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
+1
View File
@@ -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 */