summaryrefslogtreecommitdiff
path: root/lib/wsprd
diff options
context:
space:
mode:
authorChristoph Berg <christoph.berg@credativ.de>2019-03-11 14:19:23 +0100
committerChristoph Berg <christoph.berg@credativ.de>2019-03-11 14:19:23 +0100
commit200de07a95209a55d6019ba87f0abc78d302bf4c (patch)
tree3b2922eb5d89b01ad214cae492e871c3bfb5df18 /lib/wsprd
parente0737c56c1e384e05064a0c6e1ac46979371041b (diff)
New upstream version 2.0.1+repackupstream/2.0.1+repack
Diffstat (limited to 'lib/wsprd')
-rw-r--r--lib/wsprd/wsprd.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/lib/wsprd/wsprd.c b/lib/wsprd/wsprd.c
index 2e4c3c23..3fb15f5a 100644
--- a/lib/wsprd/wsprd.c
+++ b/lib/wsprd/wsprd.c
@@ -1254,7 +1254,7 @@ int main(int argc, char *argv[])
not_decoded=1;
int osd_decode=0;
int ib=1, blocksize;
- int n1,n2;
+ int n1,n2,n3,nadd,nu,ntype;
while( ib <= nblocksize && not_decoded ) {
blocksize=ib;
idt=0; ii=0;
@@ -1311,12 +1311,23 @@ int main(int argc, char *argv[])
unpack50(message,&n1,&n2);
if( !unpackcall(n1,callsign) ) break;
callsign[12]=0;
- ihash=nhash(callsign,strlen(callsign),(uint32_t)146);
- if(strncmp(hashtab+ihash*13,callsign,13)==0) {
- not_decoded=0;
- osd_decode =1;
- break;
- }
+ ntype = (n2&127) - 64;
+ if( (ntype >= 0) && (ntype <= 62) ) {
+ nu = ntype%10;
+ if( !(nu == 0 || nu == 3 || nu == 7) ) {
+ nadd=nu;
+ if( nu > 3 ) nadd=nu-3;
+ if( nu > 7 ) nadd=nu-7;
+ n3=n2/128+32768*(nadd-1);
+ if( !unpackpfx(n3,callsign) ) break;
+ }
+ ihash=nhash(callsign,strlen(callsign),(uint32_t)146);
+ if(strncmp(hashtab+ihash*13,callsign,13)==0) {
+ not_decoded=0;
+ osd_decode =1;
+ break;
+ }
+ }
}
}