aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-08-22 00:33:42 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-08-22 00:33:42 +0800
commit8536a2be55812f0042b1a440767e209c88ce092a (patch)
tree031a402d7e0f00fcc7f06ed2778b27cff6831148
parent8cb1ce04ac5efcc71680e8da2843535244fd2ec3 (diff)
downloadgsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar.gz
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar.bz2
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar.lz
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar.xz
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.tar.zst
gsoc2013-evolution-8536a2be55812f0042b1a440767e209c88ce092a.zip
use a 'char **' for the 'error_msg' argument, instead of a fixed size
2003-08-21 Rodrigo Moya <rodrigo@ximian.com> * cal-client/cal-client.[ch] (cal_client_send_object): use a 'char **' for the 'error_msg' argument, instead of a fixed size string. * gui/itip-utils.c (comp_server_send): pass the correct parameter to cal_client_send_object. svn path=/trunk/; revision=22326
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/cal-client/cal-client.c6
-rw-r--r--calendar/cal-client/cal-client.h2
-rw-r--r--calendar/gui/itip-utils.c5
4 files changed, 15 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c3475fa6c6..876ccb2e56 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2003-08-21 Rodrigo Moya <rodrigo@ximian.com>
+
+ * cal-client/cal-client.[ch] (cal_client_send_object): use a 'char **'
+ for the 'error_msg' argument, instead of a fixed size string.
+
+ * gui/itip-utils.c (comp_server_send): pass the correct parameter to
+ cal_client_send_object.
+
2002-08-20 Hans Petter Jansson <hpj@ximian.com>
* gui/e-itip-control.c (start_defalt_server): Rename to
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 762e2c7e4a..e40d405120 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -2822,7 +2822,7 @@ cal_client_remove_object (CalClient *client, const char *uid)
CalClientResult
cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
icalcomponent **new_icalcomp, GList **users,
- char error_msg[256])
+ char **error_msg)
{
CalClientPrivate *priv;
CORBA_Environment ev;
@@ -2850,8 +2850,8 @@ cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
retval = CAL_CLIENT_SEND_INVALID_OBJECT;
} else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_Busy)) {
retval = CAL_CLIENT_SEND_BUSY;
- strcpy (error_msg,
- ((GNOME_Evolution_Calendar_Cal_Busy *)(CORBA_exception_value (&ev)))->errorMsg);
+ if (error_msg)
+ *error_msg = g_strdup (((GNOME_Evolution_Calendar_Cal_Busy *)(CORBA_exception_value (&ev)))->errorMsg);
} else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_PermissionDenied)) {
retval = CAL_CLIENT_SEND_PERMISSION_DENIED;
} else if (BONOBO_EX (&ev)) {
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index 376c674c58..961ba5d993 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -214,7 +214,7 @@ CalClientResult cal_client_remove_object_with_mod (CalClient *client, const char
CalClientSendResult cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
icalcomponent **new_icalcomp, GList **users,
- char error_msg[256]);
+ char **error_msg);
CalQuery *cal_client_get_query (CalClient *client, const char *sexp);
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index aea984cb2e..366261ecff 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -530,11 +530,11 @@ comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *
{
CalClientSendResult result;
icalcomponent *top_level, *new_top_level = NULL;
- char error_msg[256];
+ char *error_msg;
gboolean retval = TRUE;
top_level = comp_toplevel_with_zones (method, comp, client, zones);
- result = cal_client_send_object (client, top_level, &new_top_level, users, error_msg);
+ result = cal_client_send_object (client, top_level, &new_top_level, users, &error_msg);
if (result == CAL_CLIENT_SEND_SUCCESS) {
icalcomponent *ical_comp;
@@ -546,6 +546,7 @@ comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *
} else if (result == CAL_CLIENT_SEND_BUSY) {
e_notice (NULL, GTK_MESSAGE_ERROR, error_msg);
+ g_free (error_msg);
retval = FALSE;
}