diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-09-13 15:50:52 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-09-13 15:50:52 +0200 |
commit | 7d786057b4e62bb46fbc33fea6063abc9a13bc66 (patch) | |
tree | 3d35a16fc979238bf7aa6f8b31d08f221eb251dd /src/libstrongswan/utils/enumerator.c | |
parent | bc6ec4de7314885d2725bccc186a527bda37c2bc (diff) | |
parent | 08ad639f327d2e5445d7274b7705093704151f35 (diff) | |
download | strongswan-7d786057b4e62bb46fbc33fea6063abc9a13bc66.tar.bz2 strongswan-7d786057b4e62bb46fbc33fea6063abc9a13bc66.tar.xz |
Merge branch 'custom-crypto'
This provides plugins with an interface to register keywords for
proposals (e.g. when parsing the esp and ike options from ipsec.conf)
and the possibility to register identifiers for kernel algorithms.
It is based on patches contributed by Nanoteq Pty Ltd.
Diffstat (limited to 'src/libstrongswan/utils/enumerator.c')
-rw-r--r-- | src/libstrongswan/utils/enumerator.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libstrongswan/utils/enumerator.c b/src/libstrongswan/utils/enumerator.c index fb461b448..53c94f9dd 100644 --- a/src/libstrongswan/utils/enumerator.c +++ b/src/libstrongswan/utils/enumerator.c @@ -121,7 +121,7 @@ static bool enumerate_dir_enum(dir_enum_t *this, char **relative, /** * See header */ -enumerator_t* enumerator_create_directory(char *path) +enumerator_t* enumerator_create_directory(const char *path) { int len; dir_enum_t *this = malloc_thing(dir_enum_t); @@ -168,9 +168,9 @@ typedef struct { /** current position */ char *pos; /** separater chars */ - char *sep; + const char *sep; /** trim chars */ - char *trim; + const char *trim; } token_enum_t; /** @@ -187,7 +187,8 @@ static void destroy_token_enum(token_enum_t *this) */ static bool enumerate_token_enum(token_enum_t *this, char **token) { - char *pos = NULL, *tmp, *sep, *trim; + const char *sep, *trim; + char *pos = NULL, *tmp; bool last = FALSE; /* trim leading characters/separators */ @@ -303,7 +304,8 @@ static bool enumerate_token_enum(token_enum_t *this, char **token) /** * See header */ -enumerator_t* enumerator_create_token(char *string, char *sep, char *trim) +enumerator_t* enumerator_create_token(const char *string, const char *sep, + const char *trim) { token_enum_t *enumerator = malloc_thing(token_enum_t); |