X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ffnet-adc.c;h=5c609f84473f7c09a64113b0a670e91784b8157f;hb=0388d7345b17aeb284ad7d6276a2f672ade6ada7;hp=2e920e653dea1288a5febfa1bbf3cc2ce6119c1d;hpb=33fede625f6a0eac733155b0276bf1b165068051;p=doldaconnect.git diff --git a/daemon/fnet-adc.c b/daemon/fnet-adc.c index 2e920e6..5c609f8 100644 --- a/daemon/fnet-adc.c +++ b/daemon/fnet-adc.c @@ -356,13 +356,13 @@ static void hubconnect(struct fnetnode *fn, struct socket *sk) { struct adchub *hub; - getsock(hub->sk = sk); sk->readcb = (void (*)(struct socket *, void *))hubread; sk->errcb = (void (*)(struct socket *, int, void *))huberr; sk->data = fn; hub = smalloc(sizeof(*hub)); memset(hub, 0, sizeof(*hub)); + getsock(hub->sk = sk); if((hub->ich = iconv_open("wchar_t", "utf-8")) == (iconv_t)-1) { flog(LOG_CRIT, "iconv cannot handle UTF-8: %s", strerror(errno)); killfnetnode(fn);