summaryrefslogtreecommitdiff
path: root/pkgmgr_shortcut
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2012-08-21 18:30:12 +0900
committerSung-jae Park <nicesj.park@samsung.com>2012-08-21 19:45:34 +0900
commitc5c1de983ad81a83d3df7ce5f50305c673a6ec26 (patch)
treedf35e152e49efc4a3d3be72913b9489a62ec6c2a /pkgmgr_shortcut
parent83369a82ac0a4437e232ee139f0c3c5a255db3f9 (diff)
downloadshortcut-c5c1de983ad81a83d3df7ce5f50305c673a6ec26.tar.gz
shortcut-c5c1de983ad81a83d3df7ce5f50305c673a6ec26.tar.bz2
shortcut-c5c1de983ad81a83d3df7ce5f50305c673a6ec26.zip
Update the pkgmgr parser.
Find the homescreen, shortcut-list tag. Change-Id: Ie2a4fb066e199b91dcf244911f878c1effa126d8
Diffstat (limited to 'pkgmgr_shortcut')
-rw-r--r--pkgmgr_shortcut/src/service_register.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/pkgmgr_shortcut/src/service_register.c b/pkgmgr_shortcut/src/service_register.c
index 1c97bad..82119f8 100644
--- a/pkgmgr_shortcut/src/service_register.c
+++ b/pkgmgr_shortcut/src/service_register.c
@@ -472,14 +472,13 @@ int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr docPtr, const char *appid)
return -EIO;
}
- root = root->children;
- if (!root) {
- ErrPrint("Root has no child node\n");
- return -EINVAL;
+ for (root = root->children; root; root = root->next) {
+ if (!xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list"))
+ break;
}
- if (xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list")) {
- ErrPrint("Invalid XML root\n");
+ if (!root) {
+ ErrPrint("Root has no shortcut-list\n");
return -EINVAL;
}
@@ -506,14 +505,13 @@ int PKGMGR_PARSER_PLUGIN_UNINSTALL(xmlDocPtr docPtr, const char *_appid)
return -EIO;
}
- root = root->children;
- if (!root) {
- ErrPrint("Root has no children\n");
- return -EINVAL;
+ for (root = root->children; root; root = root->next) {
+ if (!xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list"))
+ break;
}
- if (xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list")) {
- ErrPrint("Invalid XML root\n");
+ if (!root) {
+ ErrPrint("Root has no shortcut-list\n");
return -EINVAL;
}
@@ -616,14 +614,13 @@ int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char *appid)
return -EIO;
}
- root = root->children;
- if (!root) {
- ErrPrint("Root has no children\n");
- return -EINVAL;
+ for (root = root->children; root; root = root->next) {
+ if (!xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list"))
+ break;
}
- if (xmlStrcasecmp(root->name, (const xmlChar *)"shortcut-list")) {
- ErrPrint("Invalid XML root\n");
+ if (!root) {
+ ErrPrint("Root has no children\n");
return -EINVAL;
}