static char *netbiosname;
static char packet[BUFFER_SIZE];
-static void save_file(const char *fname, void *packet, size_t length)
+static void save_file(const char *fname, void *ppacket, size_t length)
{
int fd;
fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
perror(fname);
return;
}
- if (write(fd, packet, length) != length) {
+ if (write(fd, ppacket, length) != length) {
fprintf(stderr,"Failed to write %s\n", fname);
return;
}
close(fd);
- printf("Wrote %d bytes to %s\n", length, fname);
+ printf("Wrote %ld bytes to %s\n", (unsigned long)length, fname);
}
static void filter_reply(char *buf)
netbiosname = argv[2];
}
- if (!lp_load(configfile,True,False,False)) {
+ if (!lp_load(configfile,True,False,False,True)) {
d_printf("Unable to load config file\n");
}