summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8d69a3a)
We were using the void * ctx argument as the file descriptor. Find for
32 bit, but on 64 bit we're truncating. No reason not to just pass the
pointer to the fd, so do so.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
struct openpgp_packet_list *list_end = NULL;
struct buffer_ctx storebuf;
int ret = 0;
struct openpgp_packet_list *list_end = NULL;
struct buffer_ctx storebuf;
int ret = 0;
if (key != NULL) {
storebuf.offset = 0;
if (key != NULL) {
storebuf.offset = 0;
logthing(LOGTHING_TRACE,
"Sending %d bytes.",
storebuf.offset);
logthing(LOGTHING_TRACE,
"Sending %d bytes.",
storebuf.offset);
- ret = write(fd, &storebuf.offset,
+ ret = write(*fd, &storebuf.offset,
sizeof(storebuf.offset));
if (ret != 0) {
sizeof(storebuf.offset));
if (ret != 0) {
- write(fd, storebuf.buffer,
+ write(*fd, storebuf.buffer,
cmd = KEYD_REPLY_OK;
write(fd, &cmd, sizeof(cmd));
config.dbbackend->iterate_keys(iteratefunc,
cmd = KEYD_REPLY_OK;
write(fd, &cmd, sizeof(cmd));
config.dbbackend->iterate_keys(iteratefunc,
bytes = 0;
write(fd, &bytes, sizeof(bytes));
break;
bytes = 0;
write(fd, &bytes, sizeof(bytes));
break;