aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-04-14 16:13:42 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-04-14 16:13:42 -0400
commit361d96393eed5379df0f83eec2f09e66e9efef5f (patch)
tree7a904322c57c903b340b772f852f19d557e389e8
parente25a3f60f7f29c14bc0c32ef5e732c79075d70f1 (diff)
parent28549d9566af78e3164695db67b98ba49ee57a53 (diff)
downloadayatana-indicator-application-361d96393eed5379df0f83eec2f09e66e9efef5f.tar.gz
ayatana-indicator-application-361d96393eed5379df0f83eec2f09e66e9efef5f.tar.bz2
ayatana-indicator-application-361d96393eed5379df0f83eec2f09e66e9efef5f.zip
releasing version 0.3.2-0ubuntu1
-rw-r--r--ChangeLog36
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--debian/changelog12
-rw-r--r--debian/patches/lp_743564.patch14
-rw-r--r--debian/patches/series1
-rw-r--r--src/application-service-appstore.c56
7 files changed, 112 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index de65255..1d8f58c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,41 @@
# Generated by Makefile. Do not edit.
+2011-04-14 Ted Gould <ted@gould.cx>
+
+ 0.3.2
+
+2011-04-12 Ted Gould <ted@gould.cx>
+
+ Make approver signals cancelable
+
+2011-04-12 Michael Terry <mike@mterry.name>
+
+ cancel approver requests too
+
+2011-04-12 Ted Gould <ted@gould.cx>
+
+ Ensure we can cancel GetAll()
+
+2011-04-11 Michael Terry <mike@mterry.name>
+
+ make sure we can cancel GetAll call
+
+2011-04-12 Ted Gould <ted@gould.cx>
+
+ Protect from canceling
+
+2011-04-11 Michael Terry <mike@mterry.name>
+
+ catch one more cancel-before-accessing freed memory instance -- this one resulting in a double free
+
+2011-04-12 Ted Gould <ted@gould.cx>
+
+ Makes sure to free the application using the application_free() function
+
+2011-04-08 Michael Terry <mike@mterry.name>
+
+ don't merely free an app, it has to be properly removed from list and such
+
2011-04-07 Ted Gould <ted@gould.cx>
0.3.1
diff --git a/configure b/configure
index 67f41fe..a177521 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for indicator-application 0.3.1.
+# Generated by GNU Autoconf 2.67 for indicator-application 0.3.2.
#
# Report bugs to <ted@canonical.com>.
#
@@ -703,8 +703,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-application'
PACKAGE_TARNAME='indicator-application'
-PACKAGE_VERSION='0.3.1'
-PACKAGE_STRING='indicator-application 0.3.1'
+PACKAGE_VERSION='0.3.2'
+PACKAGE_STRING='indicator-application 0.3.2'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1446,7 +1446,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-application 0.3.1 to adapt to many kinds of systems.
+\`configure' configures indicator-application 0.3.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1517,7 +1517,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-application 0.3.1:";;
+ short | recursive ) echo "Configuration of indicator-application 0.3.2:";;
esac
cat <<\_ACEOF
@@ -1634,7 +1634,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-application configure 0.3.1
+indicator-application configure 0.3.2
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1914,7 +1914,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-application $as_me 0.3.1, which was
+It was created by indicator-application $as_me 0.3.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2735,7 +2735,7 @@ fi
# Define the identity of the package.
PACKAGE=indicator-application
- VERSION=0.3.1
+ VERSION=0.3.2
cat >>confdefs.h <<_ACEOF
@@ -12462,7 +12462,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-application $as_me 0.3.1, which was
+This file was extended by indicator-application $as_me 0.3.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12528,7 +12528,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-application config.status 0.3.1
+indicator-application config.status 0.3.2
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 12bc68b..d29a293 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-application, 0.3.1, ted@canonical.com)
+AC_INIT(indicator-application, 0.3.2, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-application, 0.3.1)
+AM_INIT_AUTOMAKE(indicator-application, 0.3.2)
AM_MAINTAINER_MODE
diff --git a/debian/changelog b/debian/changelog
index f21e951..44c1347 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+indicator-application (0.3.2-0ubuntu1) natty; urgency=low
+
+ * New upstream release.
+ ∘ Free app using application_free() instead of just freeing
+ the memory (LP: #743564)
+ ∘ Protect against cancellation
+ ∘ Make it so that we can cancel GetAll() (LP: #725665)
+ ∘ Make it so that we can cancel Approver requests
+ * Drop debian/patches/lp_743564.patch as merged upstream.
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 14 Apr 2011 14:30:32 -0500
+
indicator-application (0.3.1-0ubuntu2) natty; urgency=low
* debian/patches/lp_743564.patch
diff --git a/debian/patches/lp_743564.patch b/debian/patches/lp_743564.patch
deleted file mode 100644
index 8a6030b..0000000
--- a/debian/patches/lp_743564.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-=== modified file 'src/application-service-appstore.c'
---- old/src/application-service-appstore.c 2011-04-07 18:33:33 +0000
-+++ new/src/application-service-appstore.c 2011-04-08 20:54:15 +0000
-@@ -498,7 +498,8 @@
- if (menu == NULL || id == NULL || category == NULL || status == NULL ||
- icon_name == NULL) {
- g_warning("Notification Item on object %s of %s doesn't have enough properties.", app->dbus_object, app->dbus_name);
-- g_free(app); // Need to do more than this, but it gives the idea of the flow we're going for.
-+ if (!app->validated)
-+ application_free(app);
- }
- else {
- app->validated = TRUE;
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 206497e..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-lp_743564.patch
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 3e827d5..d2678fd 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -110,6 +110,7 @@ struct _Application {
gchar * guide;
gboolean currently_free;
guint ordering_index;
+ GList * approver_cancels;
GList * approved_by;
visible_state_t visible_state;
guint name_watcher;
@@ -498,7 +499,8 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
if (menu == NULL || id == NULL || category == NULL || status == NULL ||
icon_name == NULL) {
g_warning("Notification Item on object %s of %s doesn't have enough properties.", app->dbus_object, app->dbus_name);
- g_free(app); // Need to do more than this, but it gives the idea of the flow we're going for.
+ if (!app->validated)
+ application_free(app);
}
else {
app->validated = TRUE;
@@ -576,6 +578,7 @@ static void
get_all_properties (Application * app)
{
if (app->props != NULL && app->props_cancel == NULL) {
+ app->props_cancel = g_cancellable_new();
g_dbus_proxy_call(app->props, "GetAll",
g_variant_new("(s)", NOTIFICATION_ITEM_DBUS_IFACE),
G_DBUS_CALL_FLAGS_NONE, -1, app->props_cancel,
@@ -745,6 +748,11 @@ application_free (Application * app)
if (app->guide != NULL) {
g_free(app->guide);
}
+ if (app->approver_cancels != NULL) {
+ g_list_foreach(app->approver_cancels, (GFunc)g_cancellable_cancel, NULL);
+ g_list_foreach(app->approver_cancels, (GFunc)g_object_unref, NULL);
+ g_list_free(app->approver_cancels);
+ }
if (app->approved_by != NULL) {
g_list_free(app->approved_by);
}
@@ -997,6 +1005,7 @@ application_service_appstore_application_add (ApplicationServiceAppstore * appst
app->guide = NULL;
app->currently_free = FALSE;
app->ordering_index = 0;
+ app->approver_cancels = NULL;
app->approved_by = NULL;
app->visible_state = VISIBLE_STATE_HIDDEN;
app->name_watcher = 0;
@@ -1110,6 +1119,11 @@ props_cb (GObject * object, GAsyncResult * res, gpointer user_data)
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ return; // Must exit before accessing freed memory
+ }
+
if (app->props_cancel != NULL) {
g_object_unref(app->props_cancel);
app->props_cancel = NULL;
@@ -1283,6 +1297,24 @@ static void
remove_approver (gpointer papp, gpointer pproxy)
{
Application * app = (Application *)papp;
+
+ /* Check for any pending approvals and cancel them */
+ GList * iter = app->approver_cancels;
+ while (iter != NULL) {
+ GCancellable * cancel = (GCancellable *)iter->data;
+ GDBusProxy * proxy = (GDBusProxy *)g_object_get_data(G_OBJECT(cancel), "proxy");
+ if (proxy == pproxy) {
+ g_cancellable_cancel(cancel);
+ g_object_unref(cancel);
+
+ GList * next = iter->next;
+ app->approver_cancels = g_list_delete_link(app->approver_cancels, iter);
+ iter = next;
+ } else {
+ iter = iter->next;
+ }
+ }
+
app->approved_by = g_list_remove(app->approved_by, pproxy);
apply_status(app);
return;
@@ -1323,19 +1355,29 @@ static void
approver_request_cb (GObject *object, GAsyncResult *res, gpointer user_data)
{
GDBusProxy * proxy = G_DBUS_PROXY(object);
- Application * app = (Application *)user_data;
+ GCancellable * cancel = (GCancellable *)user_data;
GError * error = NULL;
gboolean approved = TRUE; /* default to approved */
GVariant * result;
result = g_dbus_proxy_call_finish(proxy, res, &error);
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ return; // Must exit before accessing freed memory
+ }
+
+ Application * app = (Application *)g_object_get_data(G_OBJECT(cancel), "app");
+ app->approver_cancels = g_list_remove(app->approver_cancels, cancel);
+ g_object_unref(cancel);
+
if (error == NULL) {
g_variant_get(result, "(b)", &approved);
g_debug("Approver responded: %s", approved ? "approve" : "rejected");
}
else {
g_debug("Approver responded error: %s", error->message);
+ g_error_free (error);
}
if (approved) {
@@ -1354,12 +1396,18 @@ check_with_new_approver (gpointer papp, gpointer papprove)
{
Application * app = (Application *)papp;
Approver * approver = (Approver *)papprove;
+ GCancellable * cancel = NULL;
+
+ cancel = g_cancellable_new();
+ g_object_set_data(G_OBJECT(cancel), "app", app);
+ g_object_set_data(G_OBJECT(cancel), "proxy", approver->proxy);
+ app->approver_cancels = g_list_prepend(app->approver_cancels, cancel);
g_dbus_proxy_call(approver->proxy, "ApproveItem",
g_variant_new("(ssuso)", app->id, app->category,
0, app->dbus_name, app->dbus_object),
- G_DBUS_CALL_FLAGS_NONE, -1, NULL,
- approver_request_cb, app);
+ G_DBUS_CALL_FLAGS_NONE, -1, cancel,
+ approver_request_cb, cancel);
return;
}