~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to hcache.c

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-06-17 17:17:28 UTC
  • mfrom: (1.1.11 upstream) (16.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090617171728-lj10l5x2m2vg6cag
Tags: 1.5.20-1ubuntu1
* Merge from debian unstable (LP: #388515)
* Build-depend on elinks-lite
  + elinks-lite doesn't provide links anymore.
  + elinks-lite is now in main, and pulls less dependencies than the
    full-fledged elinks.
* debian/control: Recommend default-mta instead of exim4. (LP: #386308)

Show diffs side-by-side

added added

removed removed

Lines of Context:
836
836
   * to ensure equivalent paths share the hcache */
837
837
  if (stat (folder, &st) == 0)
838
838
  {
839
 
    p = safe_malloc (_POSIX_PATH_MAX+1);
 
839
    p = safe_malloc (PATH_MAX+1);
840
840
    if (!realpath (folder, p))
841
841
      mutt_str_replace (&p, folder);
842
842
  } else
940
940
static int
941
941
hcache_open_gdbm (struct header_cache* h, const char* path)
942
942
{
943
 
  int pagesize = atoi(HeaderCachePageSize) ? atoi(HeaderCachePageSize) : 16384;
 
943
  int pagesize;
 
944
 
 
945
  if (mutt_atoi (HeaderCachePageSize, &pagesize) < 0 || pagesize <= 0)
 
946
    pagesize = 16384;
944
947
 
945
948
  h->db = gdbm_open((char *) path, pagesize, GDBM_WRCREAT, 00600, NULL);
946
949
  if (h->db)
1008
1011
  struct stat sb;
1009
1012
  int ret;
1010
1013
  u_int32_t createflags = DB_CREATE;
1011
 
  int pagesize = atoi (HeaderCachePageSize);
 
1014
  int pagesize;
 
1015
 
 
1016
  if (mutt_atoi (HeaderCachePageSize, &pagesize) < 0 || pagesize <= 0)
 
1017
    pagesize = 16384;
1012
1018
 
1013
1019
  snprintf (h->lockfile, _POSIX_PATH_MAX, "%s-lock-hack", path);
1014
1020