Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (7)
......@@ -460,6 +460,7 @@ void synclist(char *inpath, int dirnum)
int result = smb_open_dir(&scfg, &smb, dirnum);
if(result != SMB_SUCCESS) {
fprintf(stderr, "!Error %d (%s) opening %s\n", result, smb.last_error, smb.file);
fclose(stream);
return;
}
size_t file_count;
......
......@@ -1152,7 +1152,7 @@ int main(int argc, char **argv)
printf("%-39.39s: %-8lu %13s bytes used\n"
,"Total Active Messages"
,totalmsgs,ultoac(totalmsgbytes,str));
if(totallzhmsgs && totalmsgs!=smb.status.total_msgs)
if(totallzhmsgs)
printf("%-39.39s: %-8lu %13s bytes saved\n"
,"Total LZH Compressed Messages"
,totallzhmsgs,ultoac(totallzhsaved,str));
......
......@@ -72,12 +72,19 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc)
if(p != NULL && *p != '\0')
bprintf(P_TRUNCATE, text[FiUploadedBy], p);
if(is_op) {
*tmp = '\0';
if(f->from_ip != NULL)
bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_ip);
if(f->from_host != NULL)
bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_host);
if(f->from_prot != NULL)
bprintf(P_TRUNCATE, text[FiUploadedBy], f->from_prot);
SAFEPRINTF(tmp, "[%s] ", f->from_ip);
if(f->from_host != NULL) {
SAFEPRINTF(tmp2, "%s ", f->from_host);
SAFECAT(tmp, tmp2);
}
if(f->from_prot != NULL) {
SAFEPRINTF(tmp2, "via %s ", f->from_prot);
SAFECAT(tmp, tmp2);
}
if(*tmp != '\0')
bprintf(P_TRUNCATE, text[FiUploadedBy], tmp);
}
if(f->to_list != NULL && *f->to_list != '\0')
bprintf(P_TRUNCATE, text[FiUploadedTo], f->to_list);
......
......@@ -378,7 +378,7 @@ bool sbbs_t::listfile(file_t* f, uint dirnum, const char *search, const char let
else
outchar(' ');
if(useron.misc&BATCHFLAG) {
attr(cfg.color[clr_filedesc]);
attr(curatr ^ HIGH);
bprintf("%c",letter);
}
cdt = f->cost;
......
......@@ -84,23 +84,23 @@ void bail(int code)
exit(code);
}
char *loadmsgtail(smbmsg_t msg)
char *loadmsgtail(smbmsg_t* msg)
{
char *buf=NULL;
uint16_t xlat;
int i;
long l=0,length;
for(i=0;i<msg.hdr.total_dfields;i++) {
if(msg.dfield[i].type!=TEXT_TAIL)
for(i=0;i<msg->hdr.total_dfields;i++) {
if(msg->dfield[i].type!=TEXT_TAIL)
continue;
fseek(smb.sdt_fp,msg.hdr.offset+msg.dfield[i].offset
fseek(smb.sdt_fp,msg->hdr.offset+msg->dfield[i].offset
,SEEK_SET);
fread(&xlat,2,1,smb.sdt_fp);
if(xlat!=XLAT_NONE) /* no translations supported */
continue;
length=msg.dfield[i].length-2;
if((buf=realloc(buf,l+msg.dfield[i].length+1))==NULL)
length=msg->dfield[i].length-2;
if((buf=realloc(buf,l+msg->dfield[i].length+1))==NULL)
return(buf);
l+=fread(buf+l,1,length,smb.sdt_fp);
buf[l]=0;
......@@ -109,7 +109,7 @@ char *loadmsgtail(smbmsg_t msg)
}
void gettag(smbmsg_t msg, char *tag)
void gettag(smbmsg_t* msg, char *tag)
{
char *buf,*p;
......@@ -368,7 +368,7 @@ int main(int argc, char **argv)
}
if(cmd&NODES && msg.from_net.type==NET_QWK) {
if(mode&TAGS)
gettag(msg,tag);
gettag(&msg,tag);
if(mode&FEED)
sprintf(str,"%s/%s",cfg.sys_id,(char *)msg.from_net.addr);
else
......
......@@ -709,9 +709,8 @@ int putusername(scfg_t* cfg, int number, const char *name)
return(-3);
}
if(length<(((long)number-1)*(LEN_ALIAS+2))) {
SAFEPRINTF2(str,"%*s",LEN_ALIAS,nulstr);
SAFEPRINTF2(str,"%*s\r\n",LEN_ALIAS,nulstr);
memset(str,ETX,LEN_ALIAS);
strcat(str,crlf);
lseek(file,0L,SEEK_END);
while(filelength(file)<((long)number*(LEN_ALIAS+2)))
write(file,str,(LEN_ALIAS+2));
......
......@@ -863,7 +863,6 @@ void sbbs_t::removeline(char *str, char *str2, char num, char skip)
}
close(file);
if((stream=fnopen(&file,str,O_WRONLY|O_TRUNC))==NULL) {
close(file);
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_TRUNC);
free(buf);
return;
......