-EXIM_DB *d = (EXIM_DB *)handle;
-EXIM_DATUM key, data;
-
-exim_datum_init(&key); /* Some DBM libraries require datums to */
-exim_datum_init(&data); /* be cleared before use. */
-length++;
-exim_datum_data_set(&key,
- memcpy(store_get(length, keystring), keystring, length)); /* key can have embedded NUL */
-exim_datum_size_set(&key, length);
-
-if (exim_dbget(d, &key, &data))
- {
- unsigned len = exim_datum_size_get(&data);
- *result = len > 0 ? string_copyn(exim_datum_data_get(&data), len) : US"";
- exim_datum_free(&data); /* Some DBM libraries need a free() call */
- return OK;
- }
-return FAIL;
+open_db * d = (open_db *)handle;
+return (*result = dbfn_read_klen(d, keystring, length+1, NULL)) ? OK : FAIL;