diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c index 908641aad171c2ecf2daad80d530c15cb4fc88fa..a27635ced4f7e6fb0ef8dabb13dacb73ddbb158c 100644 --- a/src/sbbs3/js_global.c +++ b/src/sbbs3/js_global.c @@ -241,7 +241,7 @@ js_crc16(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) if((str=JS_GetStringBytes(JS_ValueToString(cx, argv[0])))==NULL) return(JS_FALSE); - *rval = INT_TO_JSVAL(crc16(str)); + *rval = INT_TO_JSVAL(crc16(str,0)); return(JS_TRUE); } diff --git a/src/sbbs3/js_msgbase.c b/src/sbbs3/js_msgbase.c index 29623f128f5379441faa40fe6fbdfb058fc1c5bd..1c63e05865f2f29b9b3edb9c7ed28ab992b948da 100644 --- a/src/sbbs3/js_msgbase.c +++ b/src/sbbs3/js_msgbase.c @@ -163,7 +163,7 @@ static BOOL parse_header_object(JSContext* cx, private_t* p, JSObject* hdr, smbm if(!(p->smb.status.attr&SMB_EMAIL)) { SAFECOPY(to,cp); strlwr(to); - msg->idx.to=crc16(to); + msg->idx.to=crc16(to,0); } if(JS_GetProperty(cx, hdr, "from", &val) && val!=JSVAL_VOID) { @@ -175,7 +175,7 @@ static BOOL parse_header_object(JSContext* cx, private_t* p, JSObject* hdr, smbm if(!(p->smb.status.attr&SMB_EMAIL)) { SAFECOPY(from,cp); strlwr(from); - msg->idx.from=crc16(from); + msg->idx.from=crc16(from,0); } /* Optional Header Fields */ diff --git a/src/sbbs3/postmsg.cpp b/src/sbbs3/postmsg.cpp index eaa3a1869e422e51812a13c25938d6d75ff6c19c..c8b180ce8b079b675f2df18eef10c843d741e841 100644 --- a/src/sbbs3/postmsg.cpp +++ b/src/sbbs3/postmsg.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -354,12 +354,12 @@ bool sbbs_t::postmsg(uint subnum, smbmsg_t *remsg, long wm_mode) smb_hfield(&msg,RECIPIENT,strlen(touser),touser); strlwr(touser); - msg.idx.to=crc16(touser); + msg.idx.to=crc16(touser,0); strcpy(str,cfg.sub[subnum]->misc&SUB_NAME ? useron.name : useron.alias); smb_hfield(&msg,SENDER,strlen(str),str); strlwr(str); - msg.idx.from=crc16(str); + msg.idx.from=crc16(str,0); sprintf(str,"%u",useron.number); smb_hfield(&msg,SENDEREXT,strlen(str),str); diff --git a/src/sbbs3/qwktomsg.cpp b/src/sbbs3/qwktomsg.cpp index c1129501dc476fe0265f9c89095617f591511272..a908b9137637381a15e81ae8f6d88f92f24ed613 100644 --- a/src/sbbs3/qwktomsg.cpp +++ b/src/sbbs3/qwktomsg.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -118,7 +118,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum truncsp(str); smb_hfield(&msg,RECIPIENT,strlen(str),str); strlwr(str); - msg.idx.to=crc16(str); + msg.idx.to=crc16(str,0); } sprintf(str,"%25.25s",hdrblk+71); /* Subject */ @@ -278,7 +278,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum msg.idx.from=useron.number; } else { strlwr(str); - msg.idx.from=crc16(str); + msg.idx.from=crc16(str,0); } if(!strnicmp(header+skip,"@MSGID:",7)) { diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp index 37742c9434e5ffacaf8700a7aef5f14e42f1454c..cef0e4406d70fef50e56e7dc5896b6abcdfd0185 100644 --- a/src/sbbs3/readmsgs.cpp +++ b/src/sbbs3/readmsgs.cpp @@ -190,11 +190,11 @@ post_t HUGE16 * sbbs_t::loadposts(long *posts, uint subnum, ulong ptr, long mode strcpy(name,useron.name); strlwr(name); - namecrc=crc16(name); + namecrc=crc16(name,0); strcpy(name,useron.alias); strlwr(name); - aliascrc=crc16(name); - sysop=crc16("sysop"); + aliascrc=crc16(name,0); + sysop=crc16("sysop",0); rewind(smb.sid_fp); @@ -1194,11 +1194,11 @@ void sbbs_t::showposts_toyou(post_t HUGE16 *post, ulong start, long posts) strcpy(str,useron.alias); strlwr(str); - aliascrc=crc16(str); + aliascrc=crc16(str,0); strcpy(str,useron.name); strlwr(str); - namecrc=crc16(str); - sysop=crc16("sysop"); + namecrc=crc16(str,0); + sysop=crc16("sysop",0); msg.total_hfields=0; for(l=start,found=0;l<posts && !msgabort();l++) { diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c index 0789651e4403ab2a9f02ab68294efe9aed73c48a..7e8b130ab17ffbeb8fe6c1cdff70cf2c02b2cd25 100644 --- a/src/sbbs3/sbbsecho.c +++ b/src/sbbs3/sbbsecho.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -2388,11 +2388,11 @@ int fmsgtosmsg(uchar HUGE16 *fbuf, fmsghdr_t fmsghdr, uint user, uint subnum) if(subnum==INVALID_SUB) msg.idx.from=0; else - msg.idx.from=crc16(fmsghdr.from); + msg.idx.from=crc16(fmsghdr.from,0); smb_hfield(&msg,RECIPIENT,(ushort)strlen(fmsghdr.to),fmsghdr.to); strlwr(fmsghdr.to); - msg.idx.to=crc16(fmsghdr.to); + msg.idx.to=crc16(fmsghdr.to,0); if(user) { sprintf(str,"%u",user); diff --git a/src/sbbs3/smbutil.c b/src/sbbs3/smbutil.c index 645ec27446515d044b1c67e4e8a521b7846c0877..89c82ed369c0615ed680701141548f5a4571591c 100644 --- a/src/sbbs3/smbutil.c +++ b/src/sbbs3/smbutil.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -246,7 +246,7 @@ void postmsg(char type, char* to, char* to_number, char* to_address, msg.idx.to=atoi(str); } else { strlwr(str); - msg.idx.to=crc16(str); + msg.idx.to=crc16(str,0); } if(smb.status.attr&SMB_EMAIL && (type=='N' || !msg.idx.to)) { @@ -302,7 +302,7 @@ void postmsg(char type, char* to, char* to_number, char* to_address, msg.idx.from=atoi(str); } else { strlwr(str); - msg.idx.from=crc16(str); + msg.idx.from=crc16(str,0); } smb_hfield(&msg, SENDERAGENT, sizeof(agent), &agent); @@ -1071,10 +1071,10 @@ void packmsgs(ulong packable) else { SAFECOPY(str,msg.to); strlwr(str); - msg.idx.to=crc16(str); + msg.idx.to=crc16(str,0); SAFECOPY(str,msg.from); strlwr(str); - msg.idx.from=crc16(str); } + msg.idx.from=crc16(str,0); } fwrite(&msg.idx,1,sizeof(idxrec_t),tmp_sid); /* Write the new header entry */