X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ffnet-adc.c;h=5c609f84473f7c09a64113b0a670e91784b8157f;hb=70d8f2f1dd421bdf51b8408b47276a5daf02dc6e;hp=2e920e653dea1288a5febfa1bbf3cc2ce6119c1d;hpb=cb530726ebe7ad3f62010cdc0a963fe225483933;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);