Print proper size_t's in filelist printers.
[doldaconnect.git] / daemon / fnet-dc.c
index 7757885..b09baf5 100644 (file)
@@ -19,7 +19,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <wchar.h>
-#include <malloc.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <string.h>
@@ -3094,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)
@@ -3245,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);
@@ -3420,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);