Print proper size_t's in filelist printers.
[doldaconnect.git] / daemon / fnet-dc.c
index c88deef..b09baf5 100644 (file)
@@ -3093,6 +3093,8 @@ static void hubdestroy(struct fnetnode *fn)
     if((fn->sk != NULL) && (fn->sk->data == fn))
     {
        fn->sk->data = NULL;
+       fn->sk->readcb = NULL;
+       fn->sk->errcb = NULL;
        putfnetnode(fn);
     }
     if(hub == NULL)
@@ -3244,7 +3246,7 @@ static void updatehmlist(void)
            if(node->f.b.type == FILE_REG)
            {
                addtobuf(buf, '|');
-               sprintf(numbuf, "%i", node->size);
+               sprintf(numbuf, "%zi", node->size);
                bufcat(buf, numbuf, strlen(numbuf));
            }
            addtobuf(buf, 13);
@@ -3419,7 +3421,7 @@ static void updatexmllist(void)
                lev++;
                continue;
            } else {
-               fprintf(fs, "<File Name=\"%s\" Size=\"%i\"", namebuf, node->size);
+               fprintf(fs, "<File Name=\"%s\" Size=\"%zi\"", namebuf, node->size);
                if(node->f.b.hastth)
                {
                    hashbuf = base32encode(node->hashtth, 24);