summaryrefslogtreecommitdiff
path: root/src/persistence_client_library_db_access.c
diff options
context:
space:
mode:
authorIngo Huerner <ingo.huerner@xse.de>2013-11-14 14:05:40 +0100
committerIngo Huerner <ingo.huerner@xse.de>2013-11-14 14:05:40 +0100
commiteefbb39403417c970e5aac03d77cb6f5dc7424a4 (patch)
treef8402975127bf9e0d98e04c263025ff129c916eb /src/persistence_client_library_db_access.c
parent2f2acbe254924c9b967ab7143cb92c04f043a593 (diff)
downloadpersistence-client-library-eefbb39403417c970e5aac03d77cb6f5dc7424a4.tar.gz
Finished switch to single threaded dbus communication
Diffstat (limited to 'src/persistence_client_library_db_access.c')
-rw-r--r--src/persistence_client_library_db_access.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/persistence_client_library_db_access.c b/src/persistence_client_library_db_access.c
index e9a8689..2f6aec7 100644
--- a/src/persistence_client_library_db_access.c
+++ b/src/persistence_client_library_db_access.c
@@ -607,7 +607,6 @@ int persistence_notify_on_change(char* key, unsigned int ldbid, unsigned int use
pclChangeNotifyCallback_t callback, PersNotifyRegPolicy_e regPolicy)
{
int rval = 0;
- uint64_t cmd;
if(regPolicy < Notify_lastEntry)
{
@@ -628,10 +627,7 @@ int persistence_notify_on_change(char* key, unsigned int ldbid, unsigned int use
gChangeNotifyCallback = NULL;
}
- // add command and data to queue
- cmd = (uint64_t)CMD_REG_NOTIFY_SIGNAL;
-
- if(-1 == write(gEfds, &cmd, (sizeof(uint64_t))))
+ if(-1 == deliverToMainloop(CMD_REG_NOTIFY_SIGNAL, 0, 0))
{
DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_notify_on_change => failed to write to pipe"), DLT_INT(errno));
rval = -1;
@@ -662,13 +658,7 @@ int pers_send_Notification_Signal(const char* key, PersistenceDbContext_s* conte
gSendNotifySeatNo = context->seat_no;
gSendNotifyReason = reason;
- //printf("pers_send_Notification_Signal => key: %s | lbid: %d | gUserNo: %d | gSeatNo: %d | gReason: %d \n", key, gLdbid, gUserNo, gSeatNo, gReason);
-
- uint64_t cmd;
- // add command and data to queue
- cmd = (uint64_t)CMD_SEND_NOTIFY_SIGNAL;
-
- if(-1 == write(gEfds, &cmd, (sizeof(uint64_t))))
+ if(-1 == deliverToMainloop(CMD_SEND_NOTIFY_SIGNAL, 0,0) )
{
DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_send_Notification_Signal => failed to write to pipe"), DLT_INT(errno));
rval = EPERS_NOTIFY_SIG;