~ubuntu-branches/ubuntu/gutsy/avscan/gutsy

« back to all changes in this revision

Viewing changes to avscan/windb.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2007-08-12 14:22:25 UTC
  • mfrom: (1.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070812142225-2whp6690lilo2wg8
Tags: 3.2.1-openssl-2
Correctly handle DEB_BUILD_OPTIONS=nostrip (Closes: #436496).

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#if defined(HAVE_CLAMAV)
32
32
# if defined(USE_CLAMAV_88)
33
 
static gint WinDBGetPatternStatsFindIterate(
 
33
static gint WinDBGetPatternStatsFind88Iterate(
34
34
        win_struct *win,
35
35
        const gchar *name,
36
36
        struct cl_node *clam_pnode,
39
39
        gulong *last_updated_time_rtn,
40
40
        gulong *discovery_time_rtn
41
41
);
42
 
# else
43
 
static gint WinDBGetPatternStatsFindIterate(
 
42
# elif defined(USE_CLAMAV_90)
 
43
static gint WinDBGetPatternStatsFind90Iterate(
44
44
        win_struct *win,
45
45
        const gchar *name,
46
46
        struct cl_engine *clam_pnode,
242
242
 
243
243
#if defined(HAVE_CLAMAV)
244
244
# if defined(USE_CLAMAV_88)
245
 
static gint WinDBGetPatternStatsFindIterate(
 
245
static gint WinDBGetPatternStatsFind88Iterate(
246
246
        win_struct *win,
247
247
        const gchar *name,
248
248
        struct cl_node *clam_pnode,
267
267
}
268
268
 
269
269
        if(clam_pnode == NULL)
270
 
            return(1);
 
270
            return(-1);
271
271
 
272
272
        /* Iterate through Extended Boyer-Moore list */
273
273
        if(clam_pnode->bm_suffix != NULL)
503
503
 
504
504
#undef PROCESS_FIND
505
505
 
506
 
        return(1);
 
506
        return(-1);
507
507
}
508
 
# else          /* USE_CLAMAV_88 */
509
 
static gint WinDBGetPatternStatsFindIterate(
 
508
# elif defined(USE_CLAMAV_90)
 
509
static gint WinDBGetPatternStatsFind90Iterate(
510
510
        win_struct *win,
511
511
        const gchar *name,
512
512
        struct cl_engine *clam_pnode,
541
541
#endif
542
542
 
543
543
        if(clam_pnode == NULL)
544
 
            return(1);
 
544
            return(-1);
545
545
 
546
546
        /* Extended Boyer-Moore & Extended Aho-Corasick list */
547
547
        if(clam_pnode->root != NULL)
783
783
 
784
784
#undef PROCESS_FIND
785
785
 
786
 
        return(1);
 
786
        return(-1);
787
787
}
788
 
# endif         /* !USE_CLAMAV_88 */
 
788
# endif         /* USE_CLAMAV_90 */
789
789
#endif          /* HAVE_CLAMAV */
790
790
 
791
791
/*
816
816
 
817
817
#if defined(HAVE_CLAMAV)
818
818
# if defined(USE_CLAMAV_88)
819
 
        return(WinDBGetPatternStatsFindIterate(
 
819
        return(WinDBGetPatternStatsFind88Iterate(
820
820
            win, name,
821
821
            (struct cl_node *)win->db,
822
822
            pattern_rtn,
824
824
            last_updated_time_rtn,
825
825
            discovery_time_rtn
826
826
        ));
827
 
# else
828
 
        return(WinDBGetPatternStatsFindIterate(
 
827
# elif defined(USE_CLAMAV_90)
 
828
        return(WinDBGetPatternStatsFind90Iterate(
829
829
            win, name,
830
830
            (struct cl_engine *)win->db,
831
831
            pattern_rtn,
833
833
            last_updated_time_rtn,
834
834
            discovery_time_rtn
835
835
        ));
 
836
# else
 
837
        return(-1);
836
838
# endif
837
839
#else
838
840
        return(-1);
1826
1828
#undef UPDATE_PATTERNS_LOADED_STATUS
1827
1829
#endif  /* #if 0 */
1828
1830
}
1829
 
# endif         /* !USE_CLAMAV_88 */
 
1831
# endif
1830
1832
#endif          /* HAVE_CLAMAV */
1831
1833
 
1832
1834
/*
2022
2024
                    db_location,
2023
2025
                    &database, &database_entries
2024
2026
                );
2025
 
#else
 
2027
#else   /* ClamAV 0.90.x and up */
2026
2028
                /* Do not load for ClamAV 0.90.x, see comment above
2027
2029
                 * function WinDBUpdateClamAV90Iterate()
2028
2030
                 */
2055
2057
                    db_location,
2056
2058
                    &database, &database_entries
2057
2059
                );
2058
 
#else
 
2060
#else   /* ClamAV 0.90.x and up */
2059
2061
                /* Do not load for ClamAV 0.90.x, see comment above
2060
2062
                 * function WinDBUpdateClamAV90Iterate()
2061
2063
                 */
2159
2161
                start_time, verbose,
2160
2162
                &patterns_loaded, &patterns_total_size_bytes
2161
2163
            );
2162
 
#else
 
2164
#else   /* ClamAV 0.90.x and up */
2163
2165
            /* Does nothing, ClamAV 0.90.x does not have publically
2164
2166
             * available virus patterns
2165
2167
             */
2263
2265
                duration_s,
2264
2266
                (win->stop_count > 0) ? " (Interrupted)" : " load time"
2265
2267
            );
2266
 
#else
 
2268
#elif defined(USE_CLAMAV_90)
2267
2269
            msg = g_strdup_printf(
2268
2270
                "%s\n%s\nClamAV 0.90.x patterns are private",
2269
2271
                db_location_s,
2270
2272
                last_updated_s
2271
2273
            );
 
2274
#else
 
2275
            msg = g_strdup_printf(
 
2276
                "%s\n%s\nClamAV 0.91.x patterns are private",
 
2277
                db_location_s,
 
2278
                last_updated_s
 
2279
            );
2272
2280
#endif
2273
2281
            gtk_label_set_text(GTK_LABEL(w), msg);
2274
2282
            g_free(msg);