|
|
|
@ -313,19 +313,16 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (res == 1) {
|
|
|
|
|
|
|
|
|
|
b2 = b;
|
|
|
|
|
b = b & 0x7f ;
|
|
|
|
|
b &= 0x7f;
|
|
|
|
|
|
|
|
|
|
/* crc checksum calculation */
|
|
|
|
|
if ( cid->sawflag > 1 ) {
|
|
|
|
|
if (cid->sawflag > 1)
|
|
|
|
|
cid->crc = calc_crc(cid->crc, (unsigned char) b2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Ignore invalid bytes */
|
|
|
|
|
if (b > 0xff) {
|
|
|
|
|
if (b > 0xff)
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* skip DLE if needed */
|
|
|
|
|
if (cid->sawflag > 0) {
|
|
|
|
@ -334,9 +331,8 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i
|
|
|
|
|
continue ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( cid->skipflag == 1 ) {
|
|
|
|
|
if (cid->skipflag == 1)
|
|
|
|
|
cid->skipflag = 0 ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* caller id retrieval */
|
|
|
|
|
switch(cid->sawflag) {
|
|
|
|
@ -679,6 +675,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int
|
|
|
|
|
cid->oldlen = mylen * 2;
|
|
|
|
|
} else
|
|
|
|
|
cid->oldlen = 0;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|