if (signal_hint->detail)
detail = g_quark_to_string (signal_hint->detail);
- if (!strncmp (detail, "add", 3))
+ if (detail && !strncmp (detail, "add", 3))
{
gpointer child;
int index = g_value_get_uint (param_values + 1);
if (!bus_name_dup) return NULL;
// TODO: change below to something that will send state-change:defunct notification if necessary */
app = g_new (CSpiApplication, 1);
- if (!app) return NULL;
+ if (!app)
+ {
+ g_free (bus_name_dup);
+ return NULL;
+ }
app->bus_name = bus_name_dup;
if (APP_IS_REGISTRY (app))
{
AccessibleKeyEventMask eventmask,
AccessibleKeyListenerSyncType sync_type)
{
- gchar *path = cspi_device_listener_get_path (listener);
+ gchar *path;
gint i;
GArray *key_set;
dbus_uint32_t key_events = 0;
{
return retval;
}
+ path = cspi_device_listener_get_path (listener);
/* copy the keyval filter values from the C api into the DBind KeySet */
if (keys)
SPI_deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener,
AccessibleKeyMaskType modmask)
{
- gchar *path = cspi_device_listener_get_path (listener);
+ gchar *path;
Accessibility_ControllerEventMask controller_event_mask;
GArray *key_set;
dbus_uint32_t key_events = 0;
return FALSE;
}
+ path = cspi_device_listener_get_path (listener);
controller_event_mask = (dbus_uint32_t) modmask;
SPIBoolean retval = FALSE;
dbus_uint32_t event_types = 0;
gint i;
- gchar *path = cspi_device_listener_get_path (listener);
+ gchar *path;
DBusError error;
if (!listener)
return retval;
}
+ path = cspi_device_listener_get_path (listener);
+
/* copy the event filter values from the C api into the CORBA KeyEventTypeSeq */
if (eventmask & SPI_BUTTON_PRESSED)
void *filter)
{
dbus_uint32_t event_types = 0;
- gchar *path = cspi_device_listener_get_path (listener);
+ gchar *path;
DBusError error;
if (!listener)
return FALSE;
}
+ path = cspi_device_listener_get_path (listener);
+
event_types |= (1 << Accessibility_BUTTON_PRESSED_EVENT);
event_types |= (1 << Accessibility_BUTTON_RELEASED_EVENT);
char *id_str = (char *) g_malloc(40);
DBusMessage *reply;
- if (strcmp (iface, DBUS_INTERFACE_DBUS) != 0 ||
- strcmp (member, "Hello") != 0)
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ if (strcmp (iface, DBUS_INTERFACE_DBUS) != 0 ||
+ strcmp (member, "Hello") != 0)
+ {
+ g_free (id_str);
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ }
/* TODO: Fix this hack (we don't handle wrap-around, for instance) */
sprintf (id_str, ":1.%d", id++);
const gchar *member,
const gchar *pathstr)
{
- DBusMessage *reply;
+ DBusMessage *reply = NULL;
DBusHandlerResult result = DBUS_HANDLER_RESULT_HANDLED;
if (!g_strcmp0(member, "GetAll"))