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

Better Synchronet version checking.

parent 3861811e
Branches
Tags
No related merge requests found
...@@ -740,20 +740,17 @@ int main(int argc, char **argv) ...@@ -740,20 +740,17 @@ int main(int argc, char **argv)
if(*sp==0) if(*sp==0)
sp++; sp++;
p=strstr(sp,"Synchronet"); p=strstr(sp,"Synchronet");
if(p!=NULL) { if(p!=NULL && (for_os=strstr(sp," for "))!=NULL) {
verified=TRUE; verified=TRUE;
for_os=strstr(sp," for ");
if(for_os==NULL)
for_os="";
p=strstr(sp,"Version "); p=strstr(sp,"Version ");
if(p==NULL) if(p==NULL)
version[0]=0; version[0]=0;
else { else {
for_os[12]=0;
p+=8; /* skip "version" */ p+=8; /* skip "version" */
tp=strchr(p,'\r'); tp=strchr(p,'\r');
if(tp!=NULL) *tp=0; if(tp!=NULL) *tp=0;
truncsp(p); truncsp(p);
for_os[12]=0;
tp=strchr(for_os+5,' '); tp=strchr(for_os+5,' ');
if(tp!=NULL) *tp=0; if(tp!=NULL) *tp=0;
truncsp(for_os); truncsp(for_os);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment