diff options
Diffstat (limited to 'src/resource.c')
-rw-r--r-- | src/resource.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resource.c b/src/resource.c index 478cf41b..cd992592 100644 --- a/src/resource.c +++ b/src/resource.c @@ -34,7 +34,10 @@ Resource * resource_new(const char * const name, const char * const show, assert(show != NULL); Resource *new_resource = malloc(sizeof(struct resource_t)); new_resource->name = strdup(name); - new_resource->show = strdup(show); + if (show == NULL || (strcmp(show, "") == 0)) + new_resource->show = strdup("online"); + else + new_resource->show = strdup(show); if (status != NULL) { new_resource->status = strdup(status); } else { |