Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

int LTPBundleFindValueWithKey ( const char *  fileName,
const char *  tokenKey,
char *  tokenValue,
int  tokenIndice 
)

Find a key in a configuration file

Parameters:
fileName file name
tokenKey key value
[out] tokenValue token value (if key found)
tokenIndice indice of the desired key
Return values:
-1 configuration file not found
0 OK
1 key not found

Definition at line 1916 of file tokenparser.c.

References LTPBundleFindOptionalValueWithKey().

{
      int ret = 0;

      ret = LTPBundleFindOptionalValueWithKey(fileName, tokenKey, tokenValue,
            tokenIndice);

      if (1 == ret)
            Log3(PCSC_LOG_CRITICAL, "Could not open bundle file %s: %s",
                  fileName, strerror(errno));

      if ((-1 == ret) && (0 == tokenIndice))
            /* Not defined at all */
            Log3(PCSC_LOG_CRITICAL, "Value/Key not defined for: %s in %s",
                  tokenKey, fileName);

      return ret;
}


Generated by  Doxygen 1.6.0   Back to index