[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [coldsync-hackers] phpgw conduit problems - RH7.2 & Palm IIIe



Oops, the error references Datebook.pm

line 544 is the if (%{$record->{"alarm"}} ne ()) line


sub PackRecord
{
        my $self = shift;
        my $record = shift;
        my $retval;

        my $rawDate;
        my $flags;

        $rawDate = ($record->{"day"}            & 0x001f) |
                  (($record->{"month"}          & 0x000f) << 5) |
                  ((($record->{"year"} - 1904)  & 0x007f) << 9);

        # XXX - Better to collect data first, then build flags.
        $flags = $record->{"other_flags"};
#       $flags |= 0x8000 if $record->{"when_changed"};
#       $flags |= 0x4000 if keys %{$record->{"alarm"}} ne ();
#       $flags |= 0x2000 if keys %{$record->{"repeat"}} ne ();
#       $flags |= 0x1000 if $record->{"note"} ne "";
#       $flags |= 0x0800 if $#{$record->{"exceptions"}} >= 0;
#       $flags |= 0x0400 if $record->{"description"} ne "";

#       $retval = pack "C C C C n n",
#               $record->{"start_hour"},
#               $record->{"start_minute"},
#               $record->{"end_hour"},
#               $record->{"end_minute"},
#               $rawDate,
#               $flags;

        if ($record->{"when_changed"})
        {
                $flags |= 0x8000;
        }

        my $alarm = undef;

        if (%{$record->{"alarm"}} ne ())
        {
                $flags |= 0x4000;
                $alarm = pack "c C",
                        $record->{"alarm"}{"advance"},
                        $record->{"alarm"}{"unit"};
        }

        my $repeat = undef;

        if (%{$record->{"repeat"}} ne ())
        {
                my $type;               # Repeat type
                my $endDate;
                my $repeatOn;
                my $repeatStartOfWeek = 0;

... routine continues

-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.