Changeset 4634

Show
Ignore:
Timestamp:
11/12/08 05:08:30 (2 months ago)
Author:
andreas
Message:

improved fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/charon/config/proposal.c

    r4633 r4634  
    211211{ 
    212212    enumerator_t *enumerator; 
    213     bool found = FALSE; 
    214      
    215     if (key_size) 
    216     { 
    217         *key_size = 0; /* Just in case no algorithm is found */ 
    218     } 
     213    bool found; 
     214     
    219215    enumerator = create_enumerator(this, type); 
    220216    if (enumerator->enumerate(enumerator, alg, key_size)) 
    221217    { 
    222218        found = TRUE; 
     219    } 
     220    else 
     221    { 
     222        if (key_size) 
     223        { 
     224            *key_size = 0; 
     225        } 
     226        found = FALSE; 
    223227    } 
    224228    enumerator->destroy(enumerator);