~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to camel/camel-filter-driver.c

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
459
459
           struct _CamelSExpResult **argv,
460
460
           CamelFilterDriver *driver)
461
461
{
462
 
        d(fprintf (stderr, "doing delete\n"));
 
462
        d (fprintf (stderr, "doing delete\n"));
463
463
        driver->priv->deleted = TRUE;
464
464
        camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Delete");
465
465
 
472
472
               struct _CamelSExpResult **argv,
473
473
               CamelFilterDriver *driver)
474
474
{
475
 
        d(fprintf (stderr, "marking message for forwarding\n"));
 
475
        d (fprintf (stderr, "marking message for forwarding\n"));
476
476
 
477
477
        /* requires one parameter, string with a destination address */
478
478
        if (argc < 1 || argv[0]->type != CAMEL_SEXP_RES_STRING)
494
494
                "Forward message to '%s'",
495
495
                argv[0]->value.string);
496
496
 
497
 
        camel_session_forward_to (
 
497
        /* XXX Not cancellable. */
 
498
        camel_session_forward_to_sync (
498
499
                driver->priv->session,
499
500
                driver->priv->source,
500
501
                driver->priv->message,
501
502
                argv[0]->value.string,
 
503
                NULL,
502
504
                &driver->priv->error);
503
505
 
504
506
        return NULL;
512
514
{
513
515
        gint i;
514
516
 
515
 
        d(fprintf (stderr, "copying message...\n"));
 
517
        d (fprintf (stderr, "copying message...\n"));
516
518
 
517
519
        for (i = 0; i < argc; i++) {
518
520
                if (argv[i]->type == CAMEL_SEXP_RES_STRING) {
581
583
{
582
584
        gint i;
583
585
 
584
 
        d(fprintf (stderr, "moving message...\n"));
 
586
        d (fprintf (stderr, "moving message...\n"));
585
587
 
586
588
        for (i = 0; i < argc; i++) {
587
589
                if (argv[i]->type == CAMEL_SEXP_RES_STRING) {
642
644
 
643
645
                        if (driver->priv->error == NULL) {
644
646
                                driver->priv->moved = TRUE;
645
 
                                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s", folder);
 
647
                                camel_filter_driver_log (
 
648
                                        driver, FILTER_LOG_ACTION,
 
649
                                        "Move to folder %s", folder);
646
650
                        }
647
651
                }
648
652
        }
649
653
 
650
654
        /* implicit 'stop' with 'move' */
651
 
        camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
 
655
        camel_filter_driver_log (
 
656
                driver, FILTER_LOG_ACTION,
 
657
                "Stopped processing");
652
658
        driver->priv->terminated = TRUE;
653
659
 
654
660
        return NULL;
660
666
         struct _CamelSExpResult **argv,
661
667
         CamelFilterDriver *driver)
662
668
{
663
 
        camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
664
 
        d(fprintf (stderr, "terminating message processing\n"));
 
669
        camel_filter_driver_log (
 
670
                driver, FILTER_LOG_ACTION,
 
671
                "Stopped processing");
 
672
        d (fprintf (stderr, "terminating message processing\n"));
665
673
        driver->priv->terminated = TRUE;
666
674
 
667
675
        return NULL;
673
681
          struct _CamelSExpResult **argv,
674
682
          CamelFilterDriver *driver)
675
683
{
676
 
        d(fprintf (stderr, "setting label tag\n"));
 
684
        d (fprintf (stderr, "setting label tag\n"));
677
685
        if (argc > 0 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
678
686
                /* This is a list of new labels, we should used these in case of passing in old names.
679
687
                 * This all is required only because backward compatibility. */
694
702
                        camel_folder_set_message_user_flag (driver->priv->source, driver->priv->uid, label, TRUE);
695
703
                else
696
704
                        camel_message_info_set_user_flag (driver->priv->info, label, TRUE);
697
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set label to %s", label);
 
705
                camel_filter_driver_log (
 
706
                        driver, FILTER_LOG_ACTION,
 
707
                        "Set label to %s", label);
698
708
        }
699
709
 
700
710
        return NULL;
706
716
          struct _CamelSExpResult **argv,
707
717
          CamelFilterDriver *driver)
708
718
{
709
 
        d(fprintf (stderr, "setting color tag\n"));
 
719
        d (fprintf (stderr, "setting color tag\n"));
710
720
        if (argc > 0 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
711
721
                const gchar *color = argv[0]->value.string;
712
722
 
716
726
                if (driver->priv->source && driver->priv->uid && camel_folder_has_summary_capability (driver->priv->source))
717
727
                        camel_folder_set_message_user_tag (driver->priv->source, driver->priv->uid, "color", color);
718
728
                else
719
 
                        camel_message_info_set_user_tag(driver->priv->info, "color", color);
720
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set color to %s", color ? color : "None");
 
729
                        camel_message_info_set_user_tag (driver->priv->info, "color", color);
 
730
                camel_filter_driver_log (
 
731
                        driver, FILTER_LOG_ACTION,
 
732
                        "Set color to %s", color ? color : "None");
721
733
        }
722
734
 
723
735
        return NULL;
729
741
          struct _CamelSExpResult **argv,
730
742
          CamelFilterDriver *driver)
731
743
{
732
 
        d(fprintf (stderr, "setting score tag\n"));
 
744
        d (fprintf (stderr, "setting score tag\n"));
733
745
        if (argc > 0 && argv[0]->type == CAMEL_SEXP_RES_INT) {
734
746
                gchar *value;
735
747
 
736
748
                value = g_strdup_printf ("%d", argv[0]->value.number);
737
 
                camel_message_info_set_user_tag(driver->priv->info, "score", value);
738
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set score to %d", argv[0]->value.number);
 
749
                camel_message_info_set_user_tag (driver->priv->info, "score", value);
 
750
                camel_filter_driver_log (
 
751
                        driver, FILTER_LOG_ACTION,
 
752
                        "Set score to %d", argv[0]->value.number);
739
753
                g_free (value);
740
754
        }
741
755
 
748
762
                 struct _CamelSExpResult **argv,
749
763
                 CamelFilterDriver *driver)
750
764
{
751
 
        d(fprintf (stderr, "adjusting score tag\n"));
 
765
        d (fprintf (stderr, "adjusting score tag\n"));
752
766
        if (argc > 0 && argv[0]->type == CAMEL_SEXP_RES_INT) {
753
767
                gchar *value;
754
768
                gint old;
755
769
 
756
 
                value = (gchar *)camel_message_info_user_tag(driver->priv->info, "score");
 
770
                value = (gchar *) camel_message_info_user_tag (driver->priv->info, "score");
757
771
                old = value ? atoi (value) : 0;
758
 
                value = g_strdup_printf ("%d", old+argv[0]->value.number);
759
 
                camel_message_info_set_user_tag(driver->priv->info, "score", value);
760
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Adjust score (%d) to %s", argv[0]->value.number, value);
 
772
                value = g_strdup_printf ("%d", old + argv[0]->value.number);
 
773
                camel_message_info_set_user_tag (driver->priv->info, "score", value);
 
774
                camel_filter_driver_log (
 
775
                        driver, FILTER_LOG_ACTION,
 
776
                        "Adjust score (%d) to %s",
 
777
                        argv[0]->value.number, value);
761
778
                g_free (value);
762
779
        }
763
780
 
772
789
{
773
790
        guint32 flags;
774
791
 
775
 
        d(fprintf (stderr, "setting flag\n"));
 
792
        d (fprintf (stderr, "setting flag\n"));
776
793
        if (argc == 1 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
777
794
                flags = camel_system_flag (argv[0]->value.string);
778
795
                if (driver->priv->source && driver->priv->uid && camel_folder_has_summary_capability (driver->priv->source))
782
799
                        camel_message_info_set_flags (
783
800
                                driver->priv->info, flags |
784
801
                                CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
785
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
 
802
                camel_filter_driver_log (
 
803
                        driver, FILTER_LOG_ACTION,
 
804
                        "Set %s flag", argv[0]->value.string);
786
805
        }
787
806
 
788
807
        return NULL;
796
815
{
797
816
        guint32 flags;
798
817
 
799
 
        d(fprintf (stderr, "unsetting flag\n"));
 
818
        d (fprintf (stderr, "unsetting flag\n"));
800
819
        if (argc == 1 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
801
820
                flags = camel_system_flag (argv[0]->value.string);
802
821
                if (driver->priv->source && driver->priv->uid && camel_folder_has_summary_capability (driver->priv->source))
806
825
                        camel_message_info_set_flags (
807
826
                                driver->priv->info, flags |
808
827
                                CAMEL_MESSAGE_FOLDER_FLAGGED, 0);
809
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Unset %s flag", argv[0]->value.string);
 
828
                camel_filter_driver_log (
 
829
                        driver, FILTER_LOG_ACTION,
 
830
                        "Unset %s flag", argv[0]->value.string);
810
831
        }
811
832
 
812
833
        return NULL;
989
1010
                        return NULL;
990
1011
        }
991
1012
 
992
 
        camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Piping message to %s", argv[0]->value.string);
 
1013
        camel_filter_driver_log (
 
1014
                driver, FILTER_LOG_ACTION,
 
1015
                "Piping message to %s", argv[0]->value.string);
993
1016
        pipe_to_system (f, argc, argv, driver);
994
1017
 
995
1018
        return NULL;
1005
1028
        GPtrArray *args;
1006
1029
        gint i;
1007
1030
 
1008
 
        d(fprintf (stderr, "executing shell command\n"));
 
1031
        d (fprintf (stderr, "executing shell command\n"));
1009
1032
 
1010
1033
        command = g_string_new ("");
1011
1034
 
1026
1049
 
1027
1050
        if (driver->priv->shellfunc && argc >= 1) {
1028
1051
                driver->priv->shellfunc (driver, argc, (gchar **) args->pdata, driver->priv->shelldata);
1029
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Executing shell command: [%s]",
1030
 
                                         command->str);
 
1052
                camel_filter_driver_log (
 
1053
                        driver, FILTER_LOG_ACTION,
 
1054
                        "Executing shell command: [%s]", command->str);
1031
1055
        }
1032
1056
 
1033
1057
 done:
1044
1068
         struct _CamelSExpResult **argv,
1045
1069
         CamelFilterDriver *driver)
1046
1070
{
1047
 
        d(fprintf (stderr, "beep\n"));
 
1071
        d (fprintf (stderr, "beep\n"));
1048
1072
 
1049
1073
        if (driver->priv->beep) {
1050
1074
                driver->priv->beep (driver, driver->priv->beepdata);
1060
1084
            struct _CamelSExpResult **argv,
1061
1085
            CamelFilterDriver *driver)
1062
1086
{
1063
 
        d(fprintf (stderr, "play sound\n"));
 
1087
        d (fprintf (stderr, "play sound\n"));
1064
1088
 
1065
1089
        if (driver->priv->playfunc && argc == 1 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
1066
1090
                driver->priv->playfunc (driver, argv[0]->value.string, driver->priv->playdata);
1067
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Play sound");
 
1091
                camel_filter_driver_log (
 
1092
                        driver, FILTER_LOG_ACTION, "Play sound");
1068
1093
        }
1069
1094
 
1070
1095
        return NULL;
1076
1101
              struct _CamelSExpResult **argv,
1077
1102
              CamelFilterDriver *driver)
1078
1103
{
1079
 
        d(fprintf (stderr, "only once\n"));
 
1104
        d (fprintf (stderr, "only once\n"));
1080
1105
 
1081
1106
        if (argc == 2 && !g_hash_table_lookup (driver->priv->only_once, argv[0]->value.string))
1082
 
                g_hash_table_insert (driver->priv->only_once, g_strdup (argv[0]->value.string),
1083
 
                                     g_strdup (argv[1]->value.string));
 
1107
                g_hash_table_insert (
 
1108
                        driver->priv->only_once,
 
1109
                        g_strdup (argv[0]->value.string),
 
1110
                        g_strdup (argv[1]->value.string));
1084
1111
 
1085
1112
        return NULL;
1086
1113
}
1136
1163
                g_object_unref (folder);
1137
1164
        }
1138
1165
 
1139
 
        report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(driver->priv->folders)* 100 / driver->priv->closed, _("Syncing folders"));
 
1166
        report_status (
 
1167
                driver, CAMEL_FILTER_STATUS_PROGRESS,
 
1168
                g_hash_table_size (driver->priv->folders) * 100 /
 
1169
                driver->priv->closed, _("Syncing folders"));
1140
1170
}
1141
1171
 
1142
1172
/* flush/close all folders */
1143
1173
static gint
1144
1174
close_folders (CamelFilterDriver *driver)
1145
1175
{
1146
 
        report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 0, _("Syncing folders"));
 
1176
        report_status (
 
1177
                driver, CAMEL_FILTER_STATUS_PROGRESS,
 
1178
                0, _("Syncing folders"));
1147
1179
 
1148
1180
        driver->priv->closed = 0;
1149
1181
        g_hash_table_foreach (driver->priv->folders, close_folder, driver);
1196
1228
 
1197
1229
                        time (&t);
1198
1230
                        strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t));
1199
 
                        fprintf (driver->priv->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n",
1200
 
                                 str, from ? from : "unknown", subject ? subject : "", date);
 
1231
                        fprintf (
 
1232
                                driver->priv->logfile,
 
1233
                                "Applied filter \"%s\" to "
 
1234
                                "message from %s - \"%s\" at %s\n",
 
1235
                                str, from ? from : "unknown",
 
1236
                                subject ? subject : "", date);
1201
1237
 
1202
1238
                        break;
1203
1239
                }
1229
1265
        CamelFilterDriver *driver = data->driver;
1230
1266
        CamelSExpResult *r;
1231
1267
 
1232
 
        d(printf ("evaluating: %s\n\n", action));
 
1268
        d (printf ("evaluating: %s\n\n", action));
1233
1269
 
1234
1270
        camel_sexp_input_text (driver->priv->eval, action, strlen (action));
1235
1271
        if (camel_sexp_parse (driver->priv->eval) == -1) {
1374
1410
                if (st.st_size > 0)
1375
1411
                        pc = (gint)(100.0 * ((double) camel_mime_parser_tell (mp) / (double) st.st_size));
1376
1412
 
1377
 
                report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d (%d%%)"), i, pc);
 
1413
                report_status (
 
1414
                        driver, CAMEL_FILTER_STATUS_START,
 
1415
                        pc, _("Getting message %d (%d%%)"), i, pc);
1378
1416
 
1379
1417
                message = camel_mime_message_new ();
1380
1418
                mime_part = CAMEL_MIME_PART (message);
1381
1419
 
1382
1420
                if (!camel_mime_part_construct_from_parser_sync (
1383
1421
                        mime_part, mp, cancellable, error)) {
1384
 
                        report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
 
1422
                        report_status (
 
1423
                                driver, CAMEL_FILTER_STATUS_END,
 
1424
                                100, _("Failed on message %d"), i);
1385
1425
                        g_object_unref (message);
1386
1426
                        goto fail;
1387
1427
                }
1388
1428
 
1389
1429
                info = camel_message_info_new_from_header (NULL, mime_part->headers);
1390
1430
                /* Try and see if it has X-Evolution headers */
1391
 
                xev = camel_header_raw_find(&mime_part->headers, "X-Evolution", NULL);
 
1431
                xev = camel_header_raw_find (&mime_part->headers, "X-Evolution", NULL);
1392
1432
                if (xev)
1393
1433
                        decode_flags_from_xev (xev, (CamelMessageInfoBase *) info);
1394
1434
 
1402
1442
                g_object_unref (message);
1403
1443
                if (local_error != NULL || status == -1) {
1404
1444
                        report_status (
1405
 
                                driver, CAMEL_FILTER_STATUS_END, 100,
1406
 
                                _("Failed on message %d"), i);
 
1445
                                driver, CAMEL_FILTER_STATUS_END,
 
1446
                                100, _("Failed on message %d"), i);
1407
1447
                        camel_message_info_free (info);
1408
1448
                        g_propagate_error (error, local_error);
1409
1449
                        goto fail;
1418
1458
        }
1419
1459
 
1420
1460
        if (driver->priv->defaultfolder) {
1421
 
                report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
 
1461
                report_status (
 
1462
                        driver, CAMEL_FILTER_STATUS_PROGRESS,
 
1463
                        100, _("Syncing folder"));
1422
1464
                camel_folder_synchronize_sync (
1423
1465
                        driver->priv->defaultfolder, FALSE, cancellable, NULL);
1424
1466
        }
1482
1524
                gint pc = (100 * i) / uids->len;
1483
1525
                GError *local_error = NULL;
1484
1526
 
1485
 
                report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d of %d"), i+1,
1486
 
                               uids->len);
 
1527
                report_status (
 
1528
                        driver, CAMEL_FILTER_STATUS_START,
 
1529
                        pc, _("Getting message %d of %d"),
 
1530
                        i + 1, uids->len);
1487
1531
 
1488
1532
                if (camel_folder_has_summary_capability (folder))
1489
1533
                        info = camel_folder_get_message_info (folder, uids->pdata[i]);
1524
1568
                camel_uid_cache_save (cache);
1525
1569
 
1526
1570
        if (driver->priv->defaultfolder) {
1527
 
                report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
 
1571
                report_status (
 
1572
                        driver, CAMEL_FILTER_STATUS_PROGRESS,
 
1573
                        100, _("Syncing folder"));
1528
1574
                camel_folder_synchronize_sync (
1529
1575
                        driver->priv->defaultfolder, FALSE, cancellable, NULL);
1530
1576
        }
1531
1577
 
1532
1578
        if (i == uids->len)
1533
 
                report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
 
1579
                report_status (
 
1580
                        driver, CAMEL_FILTER_STATUS_END,
 
1581
                        100, _("Complete"));
1534
1582
 
1535
1583
        if (freeuids)
1536
1584
                camel_folder_free_uids (folder, uids);
1654
1702
        if (message != NULL && camel_mime_message_get_source (message) == NULL)
1655
1703
                camel_mime_message_set_source (message, original_store_uid);
1656
1704
 
 
1705
        if (g_strcmp0 (store_uid, "local") == 0 ||
 
1706
            g_strcmp0 (store_uid, "vfolder") == 0) {
 
1707
                store_uid = NULL;
 
1708
        }
 
1709
 
 
1710
        if (g_strcmp0 (original_store_uid, "local") == 0 ||
 
1711
            g_strcmp0 (original_store_uid, "vfolder") == 0) {
 
1712
                original_store_uid = NULL;
 
1713
        }
 
1714
 
1657
1715
        list = g_queue_peek_head_link (&driver->priv->rules);
1658
1716
        result = CAMEL_SEARCH_NOMATCH;
1659
1717
 
1664
1722
                if (driver->priv->terminated)
1665
1723
                        break;
1666
1724
 
1667
 
                d(printf("applying rule %s\naction %s\n", rule->match, rule->action));
 
1725
                d (printf ("applying rule %s\naction %s\n", rule->match, rule->action));
1668
1726
 
1669
1727
                data.priv = p;
1670
1728
                data.store_uid = original_store_uid;
1681
1739
                        goto error;
1682
1740
                case CAMEL_SEARCH_MATCHED:
1683
1741
                        filtered = TRUE;
1684
 
                        camel_filter_driver_log (driver, FILTER_LOG_START, "%s", rule->name);
 
1742
                        camel_filter_driver_log (
 
1743
                                driver, FILTER_LOG_START,
 
1744
                                "%s", rule->name);
1685
1745
 
1686
 
                        if (camel_debug(":filter"))
1687
 
                                printf("filtering '%s' applying rule %s\n",
1688
 
                                       camel_message_info_subject(info)?camel_message_info_subject(info):"?no subject?", rule->name);
 
1746
                        if (camel_debug (":filter"))
 
1747
                                printf (
 
1748
                                        "filtering '%s' applying rule %s\n",
 
1749
                                        camel_message_info_subject (info) ?
 
1750
                                        camel_message_info_subject (info) :
 
1751
                                        "?no subject?", rule->name);
1689
1752
 
1690
1753
                        /* perform necessary filtering actions */
1691
 
                        camel_sexp_input_text (driver->priv->eval, rule->action, strlen (rule->action));
 
1754
                        camel_sexp_input_text (
 
1755
                                driver->priv->eval,
 
1756
                                rule->action, strlen (rule->action));
1692
1757
                        if (camel_sexp_parse (driver->priv->eval) == -1) {
1693
1758
                                g_set_error (
1694
 
                                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 
1759
                                        error, CAMEL_ERROR,
 
1760
                                        CAMEL_ERROR_GENERIC,
1695
1761
                                        _("Error parsing filter: %s: %s"),
1696
 
                                        camel_sexp_error (driver->priv->eval), rule->action);
 
1762
                                        camel_sexp_error (driver->priv->eval),
 
1763
                                        rule->action);
1697
1764
                                goto error;
1698
1765
                        }
1699
1766
                        r = camel_sexp_eval (driver->priv->eval);
1702
1769
 
1703
1770
                        if (r == NULL) {
1704
1771
                                g_set_error (
1705
 
                                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 
1772
                                        error, CAMEL_ERROR,
 
1773
                                        CAMEL_ERROR_GENERIC,
1706
1774
                                        _("Error executing filter: %s: %s"),
1707
 
                                        camel_sexp_error (driver->priv->eval), rule->action);
 
1775
                                        camel_sexp_error (driver->priv->eval),
 
1776
                                        rule->action);
1708
1777
                                goto error;
1709
1778
                        }
1710
1779
                        camel_sexp_result_free (driver->priv->eval, r);
1731
1800
        if (!(driver->priv->copied && driver->priv->deleted) && !driver->priv->moved && driver->priv->defaultfolder) {
1732
1801
                /* copy it to the default inbox */
1733
1802
                filtered = TRUE;
1734
 
                camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder");
 
1803
                camel_filter_driver_log (
 
1804
                        driver, FILTER_LOG_ACTION,
 
1805
                        "Copy to default folder");
1735
1806
 
1736
 
                if (camel_debug(":filter"))
1737
 
                        printf("filtering '%s' copy %s to default folder\n",
1738
 
                               camel_message_info_subject(info)?camel_message_info_subject(info):"?no subject?",
1739
 
                               driver->priv->modified?"modified message":"");
 
1807
                if (camel_debug (":filter"))
 
1808
                        printf (
 
1809
                                "filtering '%s' copy %s to default folder\n",
 
1810
                                camel_message_info_subject (info) ? camel_message_info_subject (info):"?no subject?",
 
1811
                                driver->priv->modified?"modified message":"");
1740
1812
 
1741
1813
                if (!driver->priv->modified && driver->priv->uid && driver->priv->source && camel_folder_has_summary_capability (driver->priv->source)) {
1742
1814
                        GPtrArray *uids;