Skip to content

Commit

Permalink
Remove dbus_connection_close() - not supposed to call this on a share…
Browse files Browse the repository at this point in the history
…d connection.
  • Loading branch information
Neil Mckee authored and Neil Mckee committed Dec 15, 2016
1 parent 998d9b9 commit bdfb271
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions src/Linux/mod_dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,6 @@ static const char* introspect_xml =
}
}

/*_________________---------------------------__________________
_________________ evt_final __________________
-----------------___________________________------------------
*/

static void evt_final(EVMod *mod, EVEvent *evt, void *data, size_t dataLen) {
HSP_mod_DBUS *mdata = (HSP_mod_DBUS *)mod->data;
if(mdata->connection) {
dbus_connection_close(mdata->connection);
mdata->connection = NULL;
}
}

/*_________________---------------------------__________________
_________________ send_reply __________________
-----------------___________________________------------------
Expand Down Expand Up @@ -480,7 +467,6 @@ static DBusHandlerResult dbusCB(DBusConnection *connection, DBusMessage *msg, vo

// connection OK - so register call-backs
EVEventRx(mod, EVGetEvent(mdata->pollBus, EVEVENT_DECI), evt_deci);
EVEventRx(mod, EVGetEvent(mdata->pollBus, EVEVENT_FINAL), evt_final);
}

#if defined(__cplusplus)
Expand Down
14 changes: 0 additions & 14 deletions src/Linux/mod_systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,19 +1222,6 @@ extern "C" {
SFLADD_ELEMENT(cs, &mdata->vnodeElem);
}

/*_________________---------------------------__________________
_________________ evt_final __________________
-----------------___________________________------------------
*/

static void evt_final(EVMod *mod, EVEvent *evt, void *data, size_t dataLen) {
HSP_mod_SYSTEMD *mdata = (HSP_mod_SYSTEMD *)mod->data;
if(mdata->connection) {
dbus_connection_close(mdata->connection);
mdata->connection = NULL;
}
}

/*_________________---------------------------__________________
_________________ dbusCB __________________
-----------------___________________________------------------
Expand Down Expand Up @@ -1346,7 +1333,6 @@ static DBusHandlerResult dbusCB(DBusConnection *connection, DBusMessage *message
EVEventRx(mod, EVGetEvent(mdata->pollBus, EVEVENT_TOCK), evt_tock);
EVEventRx(mod, EVGetEvent(mdata->pollBus, HSPEVENT_HOST_COUNTER_SAMPLE), evt_host_cs);
EVEventRx(mod, EVGetEvent(mdata->pollBus, HSPEVENT_CONFIG_FIRST), evt_config_first);
EVEventRx(mod, EVGetEvent(mdata->pollBus, EVEVENT_FINAL), evt_final);
}

#if defined(__cplusplus)
Expand Down

0 comments on commit bdfb271

Please sign in to comment.