summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Yoon <jinny.yoon@samsung.com>2012-09-04 13:22:25 +0900
committerJin Yoon <jinny.yoon@samsung.com>2012-09-04 13:35:02 +0900
commit2f9e3d2a573231404324a2e23fb4c2def0b835ba (patch)
treea2d086b82523fe2638efd442c6cac9e9438d98cc
parent744bc53e172e83ead1217b2e1c1f0f45f66f5188 (diff)
downloadmenu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.tar.gz
menu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.tar.bz2
menu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.zip
Change-Id: I0f90f2f9aebf2c7e05ecc5910fee4a3f29bc522b
-rw-r--r--packaging/menu-daemon.spec4
-rw-r--r--src/pkg_event.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/packaging/menu-daemon.spec b/packaging/menu-daemon.spec
index 1e373ae..91e0e94 100644
--- a/packaging/menu-daemon.spec
+++ b/packaging/menu-daemon.spec
@@ -6,7 +6,7 @@ Name: menu-daemon
Summary: Menu daemon
Version: 0.2.43
Release: 1
-Group: TO_BE/FILLED_IN
+Group: apps
License: Flora Software License
Source0: menu-daemon-%{version}.tar.gz
BuildRequires: pkgconfig(ail)
@@ -39,7 +39,7 @@ menu-daemon (Grab H/W key, Package manifest file parsing)
%setup -q
%build
-export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed"
+export LDFLAGS+="-Wl,--hash-style=both -Wl,--as-needed"
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
make %{?jobs:-j%jobs}
diff --git a/src/pkg_event.c b/src/pkg_event.c
index 51f5cb6..93fed03 100644
--- a/src/pkg_event.c
+++ b/src/pkg_event.c
@@ -93,7 +93,6 @@ directory_notify(void* data, Ecore_Fd_Handler* fd_handler)
while (i < len) {
struct inotify_event* event = (struct inotify_event*) &buf[i];
char *str_potksed = "potksed.";
- char *cut;
char *package = NULL;
ssize_t idx;
int nev_name;
@@ -107,15 +106,16 @@ directory_notify(void* data, Ecore_Fd_Handler* fd_handler)
nev_name --;
}
- if (str_potksed[idx] != '\0') {
+ if (str_potksed[idx] != '\0' || nev_name < 0) {
_D("This is not a desktop file : %s", event->name);
i += sizeof(struct inotify_event) + event->len;
continue;
}
package = strdup(event->name);
- cut = strstr(package, ".desktop");
- *cut = '\0';
+ break_if(NULL == package);
+
+ package[nev_name + 1] = '\0';
_D("Package : %s", package);
// add & update