summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-05-08 13:41:21 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-05-08 13:41:21 +0000
commit2810e2a6b3d36bf25e8b15fcdb078d2cc252daba (patch)
tree6b979fd0be543f3c79d322b5d8dd94c8914e6174 /hcid
parent1e3561c600a08b5a5dc45b405fe1ecc30df4f270 (diff)
Remove inotify support
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-service.c55
-rw-r--r--hcid/main.c6
2 files changed, 0 insertions, 61 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 15419cd1..01f07b2f 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -48,7 +48,6 @@
#include "dbus.h"
#include "dbus-helper.h"
#include "hcid.h"
-#include "notify.h"
#include "server.h"
#include "dbus-common.h"
#include "dbus-error.h"
@@ -957,58 +956,6 @@ static gint service_filename_cmp(struct service *service, const char *filename)
return strcmp(service->filename, filename);
}
-static void service_notify(int action, const char *name, void *user_data)
-{
- GSList *l;
- struct service *service;
- size_t len;
- char fullpath[PATH_MAX];
-
- debug("Received notify event %d for %s", action, name);
-
- len = strlen(name);
- if (len < (strlen(SERVICE_SUFFIX) + 1))
- return;
-
- if (strcmp(name + (len - strlen(SERVICE_SUFFIX)), SERVICE_SUFFIX))
- return;
-
- switch (action) {
- case NOTIFY_CREATE:
- debug("%s was created", name);
- snprintf(fullpath, sizeof(fullpath) - 1, "%s/%s", CONFIGDIR, name);
- service = create_service(fullpath);
- if (!service) {
- error("Unable to read %s", fullpath);
- break;
- }
-
- if (register_service(service) < 0) {
- error("Unable to register service");
- service_free(service);
- break;
- }
-
- if (service->autostart)
- service_start(service, get_dbus_connection());
-
- break;
- case NOTIFY_DELETE:
- debug("%s was deleted", name);
- l = g_slist_find_custom(services, name,
- (GCompareFunc) service_filename_cmp);
- if (l)
- unregister_service(l->data);
- break;
- case NOTIFY_MODIFY:
- debug("%s was modified", name);
- break;
- default:
- debug("Unknown notify action %d", action);
- break;
- }
-}
-
int init_services(const char *path)
{
DIR *d;
@@ -1052,8 +999,6 @@ int init_services(const char *path)
closedir(d);
- notify_add(path, service_notify, NULL);
-
return 0;
}
diff --git a/hcid/main.c b/hcid/main.c
index 0c9bd7ef..9980cc4e 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -48,8 +48,6 @@
#include <dbus/dbus.h>
-#include "notify.h"
-
#include "hcid.h"
#include "sdpd.h"
#include "adapter.h"
@@ -918,8 +916,6 @@ int main(int argc, char *argv[])
start_sdp_server(mtu, hcid.deviceid, SDP_SERVER_COMPAT);
set_service_classes_callback(update_service_classes);
- notify_init();
-
/* Loading plugins has to be done after D-Bus has been setup since
* the plugins might wanna expose some paths on the bus. However the
* best order of how to init various subsystems of the Bluetooth
@@ -941,8 +937,6 @@ int main(int argc, char *argv[])
hcid_dbus_exit();
- notify_close();
-
cleanup_sdp_session();
g_main_loop_unref(event_loop);