Skip to content
Snippets Groups Projects
Commit 97c775a7 authored by rswindell's avatar rswindell
Browse files

Fixed bug (blank sub description) when importing AREAS.BBS (SBBSecho).

No longer imports sub-boards that have any blank name/description fields.
Reports actual number of successfully imported message areas.
parent 2f45e218
Branches
Tags
No related merge requests found
...@@ -569,7 +569,8 @@ import into the current message group. ...@@ -569,7 +569,8 @@ import into the current message group.
SAFECOPY(tmp_code,p); /* Copy internal code suffix */ SAFECOPY(tmp_code,p); /* Copy internal code suffix */
p=tp+1; p=tp+1;
SKIP_WHITESPACE(p); /* Find echo tag */ SKIP_WHITESPACE(p); /* Find echo tag */
SAFECOPY(tmpsub.lname,truncstr(utos(p)," \t")); truncstr(p," \t"); /* Truncate tag */
SAFECOPY(tmpsub.lname,utos(p));
SAFECOPY(tmpsub.sname,tmpsub.lname); SAFECOPY(tmpsub.sname,tmpsub.lname);
SAFECOPY(tmpsub.qwkname,tmpsub.sname); SAFECOPY(tmpsub.qwkname,tmpsub.sname);
} }
...@@ -586,7 +587,6 @@ import into the current message group. ...@@ -586,7 +587,6 @@ import into the current message group.
SKIP_WHITESPACE(p); /* Find description */ SKIP_WHITESPACE(p); /* Find description */
SAFECOPY(tmpsub.lname,p); /* Copy description to long name */ SAFECOPY(tmpsub.lname,p); /* Copy description to long name */
} }
ported++;
} }
else { else {
memset(&tmpsub,0,sizeof(sub_t)); memset(&tmpsub,0,sizeof(sub_t));
...@@ -650,7 +650,6 @@ import into the current message group. ...@@ -650,7 +650,6 @@ import into the current message group.
truncsp(str); truncsp(str);
sprintf(tmpsub.mod_arstr,"%.*s",LEN_ARSTR,str); sprintf(tmpsub.mod_arstr,"%.*s",LEN_ARSTR,str);
ported++;
while(!feof(stream) while(!feof(stream)
&& strcmp(str,"***END-OF-SUB***")) { && strcmp(str,"***END-OF-SUB***")) {
if(!fgets(str,128,stream)) break; if(!fgets(str,128,stream)) break;
...@@ -668,6 +667,13 @@ import into the current message group. ...@@ -668,6 +667,13 @@ import into the current message group.
truncsp(tmpsub.sname); truncsp(tmpsub.sname);
truncsp(tmpsub.lname); truncsp(tmpsub.lname);
truncsp(tmpsub.qwkname); truncsp(tmpsub.qwkname);
if(tmpsub.code_suffix[0]==0
|| tmpsub.sname[0]==0
|| tmpsub.lname[0]==0
|| tmpsub.qwkname[0]==0)
continue;
for(j=0;j<cfg.total_subs;j++) { for(j=0;j<cfg.total_subs;j++) {
if(cfg.sub[j]->grp!=i) if(cfg.sub[j]->grp!=i)
continue; continue;
...@@ -718,6 +724,7 @@ import into the current message group. ...@@ -718,6 +724,7 @@ import into the current message group.
cfg.total_subs++; cfg.total_subs++;
} }
uifc.changes=1; uifc.changes=1;
ported++;
} }
fclose(stream); fclose(stream);
uifc.pop(0); uifc.pop(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment