/* add a rule for which messages we want to see */
dbus_bus_add_match(g_conn_listener, rule, &err);
- dbus_connection_flush(g_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCC, "Match Error (%s)", err.message);
/* add a rule for daemon error */
snprintf(rule, 256, "sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',type='signal',arg0='%s'", VC_SERVER_SERVICE_INTERFACE);
dbus_bus_add_match(g_conn_listener, rule, &err);
- dbus_connection_flush(g_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCC, "Match Error (%s)", err.message);
/* add a rule for which messages we want to see */
dbus_bus_add_match(g_m_conn_listener, rule, &err);
- dbus_connection_flush(g_m_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCM, "Match Error (%s)", err.message);
char rule_err[256] = {0, };
snprintf(rule_err, 256, "sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',type='signal',arg0='%s'", VC_SERVER_SERVICE_INTERFACE);
dbus_bus_add_match(g_m_conn_listener, rule_err, &err);
- dbus_connection_flush(g_m_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCM, "Match Error (%s)", err.message);
return ECORE_CALLBACK_PASS_ON;
}
-static void __vc_mgr_dbus_connection_free()
+static void __vc_widget_dbus_connection_free()
{
if (NULL != g_w_conn_listener) {
dbus_connection_close(g_w_conn_listener);
if (NULL == g_w_conn_listener) {
SLOG(LOG_ERROR, TAG_VCW, "Fail to get dbus connection ");
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return VC_ERROR_OPERATION_FAILED;
}
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
SLOG(LOG_ERROR, TAG_VCW, "fail dbus_bus_request_name()");
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return -2;
}
if (NULL != g_w_fd_handler) {
SLOG(LOG_WARN, TAG_VCW, "The handler already exists.");
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return 0;
}
/* add a rule for which messages we want to see */
dbus_bus_add_match(g_w_conn_listener, rule, &err);
- dbus_connection_flush(g_w_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCW, "Match Error (%s)", err.message);
dbus_error_free(&err);
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return VC_ERROR_OPERATION_FAILED;
}
int fd = 0;
if (1 != dbus_connection_get_unix_fd(g_w_conn_listener, &fd)) {
SLOG(LOG_ERROR, TAG_VCW, "fail to get fd from dbus ");
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return VC_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_VCW, "Get fd from dbus : %d", fd);
if (NULL == g_w_fd_handler) {
SLOG(LOG_ERROR, TAG_VCW, "fail to get fd handler from ecore ");
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return VC_ERROR_OPERATION_FAILED;
}
}
}
- __vc_mgr_dbus_connection_free();
+ __vc_widget_dbus_connection_free();
return 0;
}
char rule_err[256] = {0, };
snprintf(rule_err, 256, "sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',type='signal',arg0='%s'", VC_SERVER_SERVICE_INTERFACE);
dbus_bus_add_match(g_w_conn_listener, rule_err, &err);
- dbus_connection_flush(g_w_conn_listener);
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_VCW, "Match Error (%s)", err.message);