assuan external loop over socket

Marcus Brinkmann marcus.brinkmann at
Sun Oct 28 20:15:40 CET 2007

At Sat, 27 Oct 2007 15:20:32 -0400,
Ben Kibbey <bjk at> wrote:
> On Fri, Oct 26, 2007 at 03:33:09PM +0200, Marcus Brinkmann wrote:
> > > When I connect to the socket with socat, I get an IPC read error from
> > > assuan_process_next(). Maybe I'm doing something wrong?
> > 
> > I never tried with socat.  You might want to try with
> > gpg-connect-agent from the gnupg tools directory.  The reference
> > implementations are in dirmngr and gpa.  Can one look at your code
> > somewhere?
> I think I found the problem. In assuan_init_socket_server_ext(),
> ctx->inbound.fd and ctx->outbound.fd are set to ASSUAN_INVALID_FD (-1)
> while ctx->connected_fd is set to the passed fd which is the fd returned
> by accept() (right?). So the IPC read error is because the file
> descriptor is invalid. Does the client have to set INPUT and OUTPUT file
> descriptors before any IO can happen?

Ah, ok.  You still have to call assuan_accept () to run the bottom
handler and run the initial hand shake of the protocol.


More information about the Gnupg-devel mailing list