~ubuntu-branches/ubuntu/karmic/nss/karmic-updates

« back to all changes in this revision

Viewing changes to mozilla/security/nss/cmd/selfserv/selfserv.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-10-04 23:18:57 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20101004231857-grfx62qbg6gknih1
Tags: 3.12.8-0ubuntu0.9.10.1
* New upstream release v3.12.8 (NSS_3_12_8_RTM)
  - Fix browser wildcard certificate validation issue
  - Update root certs
  - Fix SSL deadlocks
* Refresh patches:
  - update debian/patches/38_kbsd.patch
  - update debian/patches/97_SSL_RENEGOTIATE_TRANSITIONAL.patch
* Bump minimum nspr version to 4.8.6
  - update debian/control
* Add new API to symbols file
  - update debian/libnss3-1d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
         */
736
736
        PR_Sleep(logPeriodTicks);
737
737
        secondsElapsed++;
738
 
        totalPeriodBytes +=  PR_AtomicSet(&loggerBytes, 0);
739
 
        totalPeriodBytesTCP += PR_AtomicSet(&loggerBytesTCP, 0);
 
738
        totalPeriodBytes +=  PR_ATOMIC_SET(&loggerBytes, 0);
 
739
        totalPeriodBytesTCP += PR_ATOMIC_SET(&loggerBytesTCP, 0);
740
740
        if (secondsElapsed != logPeriod) {
741
741
            continue;
742
742
        }
1349
1349
        /* Send testBulkTotal chunks to the client. Unlimited if 0. */
1350
1350
        if (testBulk) {
1351
1351
            while (0 < (rv = PR_Write(ssl_sock, testBulkBuf, testBulkSize))) {
1352
 
                PR_AtomicAdd(&loggerBytes, rv);
1353
 
                PR_AtomicIncrement(&bulkSentChunks);
 
1352
                PR_ATOMIC_ADD(&loggerBytes, rv);
 
1353
                PR_ATOMIC_INCREMENT(&bulkSentChunks);
1354
1354
                if ((bulkSentChunks > testBulkTotal) && (testBulkTotal != 0))
1355
1355
                    break;
1356
1356
            }
1359
1359
            if (bulkSentChunks <= testBulkTotal) {
1360
1360
                errWarn("PR_Write");
1361
1361
            }
1362
 
            PR_AtomicDecrement(&loggerOps);
 
1362
            PR_ATOMIC_DECREMENT(&loggerOps);
1363
1363
            break;
1364
1364
        }
1365
1365
    } while (0);
1444
1444
        VLOG(("selfserv: do_accept: Got connection\n"));
1445
1445
 
1446
1446
        if (logStats) {
1447
 
            PR_AtomicIncrement(&loggerOps);
 
1447
            PR_ATOMIC_INCREMENT(&loggerOps);
1448
1448
        }
1449
1449
 
1450
1450
        PZ_Lock(qLock);
1558
1558
        timeout);
1559
1559
    /* Add the amount written, but not if there's an error */
1560
1560
    if (rv > 0) 
1561
 
        PR_AtomicAdd(&loggerBytesTCP, rv);
 
1561
        PR_ATOMIC_ADD(&loggerBytesTCP, rv);
1562
1562
    return rv;
1563
1563
}
1564
1564
    
1571
1571
    PRInt32 rv = (fd->lower->methods->write)(fd->lower, buf, amount);
1572
1572
    /* Add the amount written, but not if there's an error */
1573
1573
    if (rv > 0) 
1574
 
        PR_AtomicAdd(&loggerBytesTCP, rv);
 
1574
        PR_ATOMIC_ADD(&loggerBytesTCP, rv);
1575
1575
    
1576
1576
    return rv;
1577
1577
}
1588
1588
        flags, timeout);
1589
1589
    /* Add the amount written, but not if there's an error */
1590
1590
    if (rv > 0) 
1591
 
        PR_AtomicAdd(&loggerBytesTCP, rv);
 
1591
        PR_ATOMIC_ADD(&loggerBytesTCP, rv);
1592
1592
    return rv;
1593
1593
}
1594
1594