}
/*
- * Called to set up the raw connection.
- *
- * On success, returns NULL and fills in *xconnret. On error, returns
- * a dynamically allocated error message string.
+ * Called to set up the X11Connection structure, though this does not
+ * yet connect to an actual server.
*/
-extern char *x11_init(struct X11Connection **xconnret,
- tree234 *authtree, void *c,
- const char *peeraddr, int peerport)
+struct X11Connection *x11_init(tree234 *authtree, void *c,
+ const char *peeraddr, int peerport)
{
static const struct plug_function_table fn_table = {
x11_log,
/*
* Open socket.
*/
- xconn = *xconnret = snew(struct X11Connection);
+ xconn = snew(struct X11Connection);
xconn->fn = &fn_table;
xconn->auth_protocol = NULL;
xconn->authtree = authtree;
xconn->peer_addr = peeraddr ? dupstr(peeraddr) : NULL;
xconn->peer_port = peerport;
- return NULL;
+ return xconn;
}
void x11_close(struct X11Connection *xconn)