From be043c8ce6817c80eb2c3909a539d7efcb28dea7 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 7 Nov 2000 18:37:30 +0000 Subject: Fix the default implementation for CamelService::get_name() so that it returns a malloced string instead of a static one. (A static one breaks the semantics of the method.) svn path=/trunk/; revision=6483 --- camel/ChangeLog | 5 +++++ camel/camel-service.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 5b12c2bcf7..f3e7b49d29 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2000-11-07 Ettore Perazzoli + + * camel-service.c (get_name): Strdup the "???" string you return, + so that the expected semantics for `::get_name()' is respected. + 2000-11-07 Dan Winship * camel-stream-filter.c (d): Kill debugging, as it causes lots of diff --git a/camel/camel-service.c b/camel/camel-service.c index 15702db42f..ee2a5b5431 100644 --- a/camel/camel-service.c +++ b/camel/camel-service.c @@ -287,7 +287,7 @@ get_name (CamelService *service, gboolean brief) { g_warning ("CamelService::get_name not implemented for `%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (service))); - return "???"; + return g_strdup ("???"); } /** -- cgit v1.2.3