- }
- if (ret != DB_NOTFOUND) {
- logthing(LOGTHING_ERROR, "Problem reading key: %s",
+ while (ret == 0) {
+ write(fd, data.data, data.size);
+ memset(&key, 0, sizeof(key));
+ memset(&data, 0, sizeof(data));
+ ret = cursor->c_get(cursor, &key, &data,
+ DB_NEXT);
+ }
+ if (ret != DB_NOTFOUND) {
+ logthing(LOGTHING_ERROR,
+ "Problem reading key: %s",