}
}
+/**
+ * @brief Context for the keyserver dumping function
+ */
struct dump_ctx {
+ /** Keys we've dumped so far to this file */
int count;
+ /** Maximum keys to dump per file */
int maxcount;
+ /** File descriptor for the current dump file */
int fd;
+ /** Number of the current dump file */
int filenum;
+ /** Base filename to use for dump files */
char *filebase;
};
unsigned char *photo = NULL;
size_t length = 0;
- if (getphoto(keys, 0, &photo, &length)) {
+ if (getphoto(keys, 0, &photo,
+ &length) == ONAK_E_OK) {
fwrite(photo,
1,
length,