aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>1999-09-23 06:28:41 +0800
committerEskil Heyn Olsen <eskil@src.gnome.org>1999-09-23 06:28:41 +0800
commita6d203d4a8fcfc055f35be85d3003a8d81ffa1b2 (patch)
treee6559b5e87137402c60257c0bd9efa6daeaec957
parentf269368c93a2e90753b286d43f6d34303c4c0929 (diff)
downloadgsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar.gz
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar.bz2
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar.lz
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar.xz
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.tar.zst
gsoc2013-evolution-a6d203d4a8fcfc055f35be85d3003a8d81ffa1b2.zip
commented out a g_free that glib reported as being a duplicate free. got
* corba-cal.c: commented out a g_free that glib reported as being a duplicate free. * calendar_conduit.c: got gnomecal->pilot up and runnning. svn path=/trunk/; revision=1251
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/calendar-conduit.c26
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c26
-rw-r--r--calendar/corba-cal.c2
-rw-r--r--calendar/gui/calendar-conduit.c26
-rw-r--r--calendar/gui/corba-cal.c2
6 files changed, 64 insertions, 23 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 53a86a9a66..0a9fc3131f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+1999-02-06 Eskil Olsen <deity@eskil.dk>
+ * corba-cal.c: commented out a g_free that glib reported
+ as being a duplicate free.
+ * calendar_conduit.c: got gnomecal->pilot up and runnning.
+
1999-02-06 Lauris Kaplinski <lauris@ariman.ee>
* gncal.desktop: Added Estonian translations.
diff --git a/calendar/calendar-conduit.c b/calendar/calendar-conduit.c
index 8f7772bcf4..798f25ceee 100644
--- a/calendar/calendar-conduit.c
+++ b/calendar/calendar-conduit.c
@@ -801,6 +801,7 @@ transmit (GnomePilotConduitStandardAbs *conduit,
gpointer data)
{
PilotRecord *p;
+ int x,y;
g_return_val_if_fail(conduit!=NULL,NULL);
g_return_val_if_fail(local!=NULL,NULL);
@@ -817,15 +818,14 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a = g_new0(struct Appointment,1);
- local->a->event = 0;
+ local->a->event = 0; /* if no start time, leave at 1 */
local->a->begin = *localtime(&local->ical->dtstart);
local->a->end = *localtime(&local->ical->dtend);
- /* g_print("calconduit: new item from %s to %s\n",asctime(&(local->a->begin)),asctime(&(local->a->end))); */
-
local->a->alarm = 0;
local->a->advance = 0;
local->a->advanceUnits = advMinutes;
+
local->a->repeatType = repeatNone;
local->a->repeatForever = 0;
local->a->repeatEnd = local->a->end;
@@ -842,9 +842,6 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a->exceptions = 0;
local->a->exception = NULL;
- g_message("local->ical->comment = %s",local->ical->comment);
- g_message("local->ical->summary = %s",local->ical->summary);
-
/* STOP: don't replace these with g_strdup, since free_Appointment
uses free to deallocte */
local->a->note =
@@ -853,8 +850,23 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->ical->summary==NULL?NULL:strdup(local->ical->summary);
p->record = g_new0(char,0xffff);
- pack_Appointment(local->a,p->record,sizeof(p->record));
+ p->length = pack_Appointment(local->a,p->record,0xffff);
+#if 0
+ g_message("calconduit: new item from %s to %s",asctime(&(local->a->begin)),asctime(&(local->a->end)));
+
+ g_message("local->a->note = %s",local->a->note);
+ g_message("local->a->description = %s",local->a->description);
+ g_message("sizeof(p->record) = %d, length is %d",sizeof(p->record),p->length);
+ for(x=0;x<p->length;x+=32) {
+ for(y=x;y<x+32;y++)
+ if(p->record[y]<33 || p->record[y]>128)
+ printf("%02X",p->record[y]);
+ else
+ printf(" %c",p->record[y]);
+ printf("\n");
+ }
+#endif
return p;
}
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 8f7772bcf4..798f25ceee 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -801,6 +801,7 @@ transmit (GnomePilotConduitStandardAbs *conduit,
gpointer data)
{
PilotRecord *p;
+ int x,y;
g_return_val_if_fail(conduit!=NULL,NULL);
g_return_val_if_fail(local!=NULL,NULL);
@@ -817,15 +818,14 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a = g_new0(struct Appointment,1);
- local->a->event = 0;
+ local->a->event = 0; /* if no start time, leave at 1 */
local->a->begin = *localtime(&local->ical->dtstart);
local->a->end = *localtime(&local->ical->dtend);
- /* g_print("calconduit: new item from %s to %s\n",asctime(&(local->a->begin)),asctime(&(local->a->end))); */
-
local->a->alarm = 0;
local->a->advance = 0;
local->a->advanceUnits = advMinutes;
+
local->a->repeatType = repeatNone;
local->a->repeatForever = 0;
local->a->repeatEnd = local->a->end;
@@ -842,9 +842,6 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a->exceptions = 0;
local->a->exception = NULL;
- g_message("local->ical->comment = %s",local->ical->comment);
- g_message("local->ical->summary = %s",local->ical->summary);
-
/* STOP: don't replace these with g_strdup, since free_Appointment
uses free to deallocte */
local->a->note =
@@ -853,8 +850,23 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->ical->summary==NULL?NULL:strdup(local->ical->summary);
p->record = g_new0(char,0xffff);
- pack_Appointment(local->a,p->record,sizeof(p->record));
+ p->length = pack_Appointment(local->a,p->record,0xffff);
+#if 0
+ g_message("calconduit: new item from %s to %s",asctime(&(local->a->begin)),asctime(&(local->a->end)));
+
+ g_message("local->a->note = %s",local->a->note);
+ g_message("local->a->description = %s",local->a->description);
+ g_message("sizeof(p->record) = %d, length is %d",sizeof(p->record),p->length);
+ for(x=0;x<p->length;x+=32) {
+ for(y=x;y<x+32;y++)
+ if(p->record[y]<33 || p->record[y]>128)
+ printf("%02X",p->record[y]);
+ else
+ printf(" %c",p->record[y]);
+ printf("\n");
+ }
+#endif
return p;
}
diff --git a/calendar/corba-cal.c b/calendar/corba-cal.c
index e21ea29f6a..49978a5bf1 100644
--- a/calendar/corba-cal.c
+++ b/calendar/corba-cal.c
@@ -219,7 +219,7 @@ cal_repo_get_objects (PortableServer_Servant servant,
}
str = calendar_get_as_vcal_string (dirty_cal);
res = CORBA_string_dup (str);
- g_free (str);
+ /* g_free (str); glib with memcheck enabled says this is already freed */
calendar_destroy (dirty_cal);
g_message("added %d items to return value",items_dbg);
diff --git a/calendar/gui/calendar-conduit.c b/calendar/gui/calendar-conduit.c
index 8f7772bcf4..798f25ceee 100644
--- a/calendar/gui/calendar-conduit.c
+++ b/calendar/gui/calendar-conduit.c
@@ -801,6 +801,7 @@ transmit (GnomePilotConduitStandardAbs *conduit,
gpointer data)
{
PilotRecord *p;
+ int x,y;
g_return_val_if_fail(conduit!=NULL,NULL);
g_return_val_if_fail(local!=NULL,NULL);
@@ -817,15 +818,14 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a = g_new0(struct Appointment,1);
- local->a->event = 0;
+ local->a->event = 0; /* if no start time, leave at 1 */
local->a->begin = *localtime(&local->ical->dtstart);
local->a->end = *localtime(&local->ical->dtend);
- /* g_print("calconduit: new item from %s to %s\n",asctime(&(local->a->begin)),asctime(&(local->a->end))); */
-
local->a->alarm = 0;
local->a->advance = 0;
local->a->advanceUnits = advMinutes;
+
local->a->repeatType = repeatNone;
local->a->repeatForever = 0;
local->a->repeatEnd = local->a->end;
@@ -842,9 +842,6 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->a->exceptions = 0;
local->a->exception = NULL;
- g_message("local->ical->comment = %s",local->ical->comment);
- g_message("local->ical->summary = %s",local->ical->summary);
-
/* STOP: don't replace these with g_strdup, since free_Appointment
uses free to deallocte */
local->a->note =
@@ -853,8 +850,23 @@ transmit (GnomePilotConduitStandardAbs *conduit,
local->ical->summary==NULL?NULL:strdup(local->ical->summary);
p->record = g_new0(char,0xffff);
- pack_Appointment(local->a,p->record,sizeof(p->record));
+ p->length = pack_Appointment(local->a,p->record,0xffff);
+#if 0
+ g_message("calconduit: new item from %s to %s",asctime(&(local->a->begin)),asctime(&(local->a->end)));
+
+ g_message("local->a->note = %s",local->a->note);
+ g_message("local->a->description = %s",local->a->description);
+ g_message("sizeof(p->record) = %d, length is %d",sizeof(p->record),p->length);
+ for(x=0;x<p->length;x+=32) {
+ for(y=x;y<x+32;y++)
+ if(p->record[y]<33 || p->record[y]>128)
+ printf("%02X",p->record[y]);
+ else
+ printf(" %c",p->record[y]);
+ printf("\n");
+ }
+#endif
return p;
}
diff --git a/calendar/gui/corba-cal.c b/calendar/gui/corba-cal.c
index e21ea29f6a..49978a5bf1 100644
--- a/calendar/gui/corba-cal.c
+++ b/calendar/gui/corba-cal.c
@@ -219,7 +219,7 @@ cal_repo_get_objects (PortableServer_Servant servant,
}
str = calendar_get_as_vcal_string (dirty_cal);
res = CORBA_string_dup (str);
- g_free (str);
+ /* g_free (str); glib with memcheck enabled says this is already freed */
calendar_destroy (dirty_cal);
g_message("added %d items to return value",items_dbg);