daemon: send notification on studio load failure

This commit is contained in:
Nedko Arnaudov 2010-08-06 02:13:35 +03:00
parent 0017f19ffa
commit 60fec2bffa
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,7 @@
#include "escape.h"
#include "cmd.h"
#include "studio_internal.h"
#include "../proxies/notify_proxy.h"
#define PARSE_CONTEXT_ROOT 0
#define PARSE_CONTEXT_STUDIO 1
@ -1251,6 +1252,10 @@ static bool run(void * command_context)
{
log_error("XML_ParseBuffer() failed.");
}
else
{
ladish_notify_simple(LADISH_NOTIFY_URGENCY_HIGH, "Studio load failed", "Please inspect the ladishd log (~/.ladish/ladish.log) for more info");
}
ladish_studio_clear();
XML_ParserFree(parser);
close(fd);
@ -1263,6 +1268,7 @@ static bool run(void * command_context)
if (parse_context.error)
{
ladish_studio_clear();
ladish_notify_simple(LADISH_NOTIFY_URGENCY_HIGH, "Studio load failed", "Please inspect the ladishd log (~/.ladish/ladish.log) for more info");
return false;
}