~ubuntu-branches/ubuntu/intrepid/squid/intrepid-security

« back to all changes in this revision

Viewing changes to src/fs/coss/store_dir_coss.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-06-18 12:09:23 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618120923-ewllt4kt92ldtvbe
Tags: 2.7.STABLE2-2ubuntu1
* Merge from debian unstable, remaining changes:
  - 99-ubuntu-ssl-cert-snakeoil:
    + src/cf.data.pre:
      * Add reference to snakeoil /etc/ssl
  - debian/control
    + Add ssl-cert to Depends to bring in snakeoil certificates.
    + Modify maintainer value to match Debian-Maintainer-Field spec.
  - debian/squid.rc
    - Use squid -k to reload the squid confiration. (LP: #204474)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
 
 * $Id: store_dir_coss.c,v 1.66.2.4 2007/05/05 22:03:47 hno Exp $
 
3
 * $Id: store_dir_coss.c,v 1.71.2.1 2008/01/02 15:49:34 hno Exp $
4
4
 *
5
5
 * DEBUG: section 47    Store COSS Directory Routines
6
6
 * AUTHOR: Eric Stern
469
469
    s.swap_file_sz = e->swap_file_sz;
470
470
    s.refcount = e->refcount;
471
471
    s.flags = e->flags;
472
 
    xmemcpy(&s.key, e->hash.key, MD5_DIGEST_CHARS);
 
472
    xmemcpy(&s.key, e->hash.key, SQUID_MD5_DIGEST_LENGTH);
473
473
    xmemcpy(state->outbuf + state->outbuf_offset, &s, ss);
474
474
    state->outbuf_offset += ss;
475
475
    /* buffered write */
560
560
    s->swap_file_sz = e->swap_file_sz;
561
561
    s->refcount = e->refcount;
562
562
    s->flags = e->flags;
563
 
    xmemcpy(s->key, e->hash.key, MD5_DIGEST_CHARS);
 
563
    xmemcpy(s->key, e->hash.key, SQUID_MD5_DIGEST_LENGTH);
564
564
    file_write(cs->swaplog_fd,
565
565
        -1,
566
566
        s,
1263
1263
    squid_off_t *l, len = 0;
1264
1264
    int blocksize = cs->blksz_mask + 1;
1265
1265
    StoreEntry tmpe;
1266
 
    cache_key key[MD5_DIGEST_CHARS];
 
1266
    cache_key key[SQUID_MD5_DIGEST_LENGTH];
1267
1267
    sfileno filen;
1268
1268
 
1269
1269
    assert(cs->rebuild.rebuilding == 1);
1299
1299
                debug(47, 3) ("Size: %" PRINTF_OFF_T " (len %d)\n", *l, t->length);
1300
1300
                break;
1301
1301
            case STORE_META_KEY:
1302
 
                if (t->length != MD5_DIGEST_CHARS) {
 
1302
                if (t->length != SQUID_MD5_DIGEST_LENGTH) {
1303
1303
                    debug(47, 1) ("COSS: %s: stripe %d: offset %d has invalid STORE_META_KEY length. Ignoring object.\n", stripePath(SD), cs->rebuild.curstripe, j);
1304
1304
                    goto nextobject;
1305
1305
                }
1306
 
                xmemcpy(key, t->value, MD5_DIGEST_CHARS);
 
1306
                xmemcpy(key, t->value, SQUID_MD5_DIGEST_LENGTH);
1307
1307
                break;
1308
1308
#if SIZEOF_SQUID_FILE_SZ == SIZEOF_SIZE_T
1309
1309
            case STORE_META_STD:
1414
1414
    rb->counts.objcount++;
1415
1415
    /* The Passed-in store entry is temporary; don't bloody use it directly! */
1416
1416
    assert(e->swap_dirn == SD->index);
1417
 
    ne = new_StoreEntry(STORE_ENTRY_WITHOUT_MEMOBJ, NULL, NULL);
 
1417
    ne = new_StoreEntry(STORE_ENTRY_WITHOUT_MEMOBJ, NULL);
1418
1418
    ne->store_status = STORE_OK;
1419
1419
    storeSetMemStatus(ne, NOT_IN_MEMORY);
1420
1420
    ne->swap_status = SWAPOUT_DONE;