~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to connect/ncbi_core.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: ncbi_core.c,v 6.15 2005/04/20 18:13:39 lavr Exp $
 
1
/*  $Id: ncbi_core.c,v 6.16 2006/04/20 13:58:46 lavr Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
405
405
    if ( rg->mt_lock )
406
406
        MT_LOCK_Delete(rg->mt_lock);
407
407
    free(rg);
 
408
 
408
409
    return 0;
409
410
}
410
411
 
425
426
    else
426
427
        *value = '\0';
427
428
 
428
 
    if ( !rg )
429
 
        return value;
430
 
 
431
 
    REG_LOCK_READ;
432
 
    REG_VALID;
433
 
 
434
 
    if ( rg->get )
435
 
        rg->get(rg->user_data, section, name, value, value_size);
436
 
 
437
 
    REG_UNLOCK;
 
429
    if ( rg ) {
 
430
        REG_LOCK_READ;
 
431
        REG_VALID;
 
432
 
 
433
        if ( rg->get )
 
434
            rg->get(rg->user_data, section, name, value, value_size);
 
435
 
 
436
        REG_UNLOCK;
 
437
    }
438
438
    return value;
439
439
}
440
440
 
446
446
 const char*  value,
447
447
 EREG_Storage storage)
448
448
{
449
 
    if ( !rg )
450
 
        return;
451
 
 
452
 
    REG_LOCK_READ;
453
 
    REG_VALID;
454
 
 
455
 
    if ( rg->set )
456
 
        rg->set(rg->user_data, section, name, value, storage);
457
 
 
458
 
    REG_UNLOCK;
 
449
    if ( rg ) {
 
450
        REG_LOCK_READ;
 
451
        REG_VALID;
 
452
 
 
453
        if ( rg->set )
 
454
            rg->set(rg->user_data, section, name, value, storage);
 
455
 
 
456
        REG_UNLOCK;
 
457
    }
459
458
}
460
459
 
461
460
 
462
461
/*
463
462
 * ---------------------------------------------------------------------------
464
463
 * $Log: ncbi_core.c,v $
 
464
 * Revision 6.16  2006/04/20 13:58:46  lavr
 
465
 * Wrap registry retrievals
 
466
 *
465
467
 * Revision 6.15  2005/04/20 18:13:39  lavr
466
468
 * +"ncbi_assert.h"
467
469
 *