assuan external loop over socket

Ben Kibbey bjk at luxsci.net
Sat Oct 27 21:20:32 CEST 2007


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?

-- 
Benjamin J. Kibbey bjk at luxsci.net/jabber/freenode
3019 F5FC AA33 5BC7 BE9F 09D2 393E DBD2 40D5 FA7E



More information about the Gnupg-devel mailing list