/* Filter out messages that are moderated below the level
* currently being viewed at.
*/
- if (smi.smi_mod < moderation_level) {
+ if (smi.meta_mod < moderation_level) {
msglist[a] = 0L;
}
* out all messages which are not of the type requested.
*/
if (content_type != NULL) if (strlen(content_type) > 0) {
- if (strcasecmp(smi.smi_content_type, content_type)) {
+ if (strcasecmp(smi.meta_content_type, content_type)) {
msglist[a] = 0L;
}
}
*/
lprintf(9, "Creating MetaData record\n");
memset(&smi, 0, sizeof(struct MetaData));
- smi.smi_msgnum = newmsgid;
- smi.smi_refcount = 0;
- safestrncpy(smi.smi_content_type, content_type, 64);
+ smi.meta_msgnum = newmsgid;
+ smi.meta_refcount = 0;
+ safestrncpy(smi.meta_content_type, content_type, 64);
PutMetaData(&smi);
/* Now figure out where to store the pointers */
delete_this |= 0x02;
} else {
GetMetaData(&smi, msglist[i]);
- if (!strcasecmp(smi.smi_content_type,
+ if (!strcasecmp(smi.meta_content_type,
content_type)) {
delete_this |= 0x02;
}
long TheIndex;
memset(smibuf, 0, sizeof(struct MetaData));
- smibuf->smi_msgnum = msgnum;
- smibuf->smi_refcount = 1; /* Default reference count is 1 */
+ smibuf->meta_msgnum = msgnum;
+ smibuf->meta_refcount = 1; /* Default reference count is 1 */
/* Use the negative of the message number for its supp record index */
TheIndex = (0L - msgnum);
long TheIndex;
/* Use the negative of the message number for its supp record index */
- TheIndex = (0L - smibuf->smi_msgnum);
+ TheIndex = (0L - smibuf->meta_msgnum);
lprintf(9, "PuttMetaData(%ld) - ref count is %d\n",
- smibuf->smi_msgnum, smibuf->smi_refcount);
+ smibuf->meta_msgnum, smibuf->meta_refcount);
cdb_store(CDB_MSGMAIN,
&TheIndex, sizeof(long),
begin_critical_section(S_SUPPMSGMAIN);
GetMetaData(&smi, msgnum);
lprintf(9, "Ref count for message <%ld> before write is <%d>\n",
- msgnum, smi.smi_refcount);
- smi.smi_refcount += incr;
+ msgnum, smi.meta_refcount);
+ smi.meta_refcount += incr;
PutMetaData(&smi);
end_critical_section(S_SUPPMSGMAIN);
lprintf(9, "Ref count for message <%ld> after write is <%d>\n",
- msgnum, smi.smi_refcount);
+ msgnum, smi.meta_refcount);
/* If the reference count is now zero, delete the message
* (and its supplementary record as well).
*/
- if (smi.smi_refcount == 0) {
+ if (smi.meta_refcount == 0) {
lprintf(9, "Deleting message <%ld>\n", msgnum);
delnum = msgnum;
cdb_delete(CDB_MSGMAIN, &delnum, sizeof(long));
cprintf("Message %7ld ", msgnum);
GetMetaData(&smi, msgnum);
- cprintf("refcount=%-2d ", smi.smi_refcount);
+ cprintf("refcount=%-2d ", smi.meta_refcount);
realcount = 0;
for (ptr = rr; ptr != NULL; ptr = ptr->next) {
}
cprintf("realcount=%-2d\n", realcount);
- if ( (smi.smi_refcount != realcount)
+ if ( (smi.meta_refcount != realcount)
|| (realcount == 0) ) {
- smi.smi_refcount = realcount;
+ smi.meta_refcount = realcount;
PutMetaData(&smi);
AdjRefCount(msgnum, 0); /* deletes if needed */
}
cprintf("message\n");
GetMetaData(&smi, msgnum);
cprintf("%ld\n", msgnum);
- cprintf("%d\n", smi.smi_refcount);
- cprintf("%s\n", smi.smi_content_type);
- cprintf("%d\n", smi.smi_mod);
+ cprintf("%d\n", smi.meta_refcount);
+ cprintf("%s\n", smi.meta_content_type);
+ cprintf("%d\n", smi.meta_mod);
serialize_message(&smr, msg);
CtdlFreeMessage(msg);
memset(&smi, 0, sizeof(struct MetaData));
client_gets(buf); msgnum = atol(buf);
- smi.smi_msgnum = msgnum;
- client_gets(buf); smi.smi_refcount = atoi(buf);
- client_gets(smi.smi_content_type);
- client_gets(buf); smi.smi_mod = atoi(buf);
+ smi.meta_msgnum = msgnum;
+ client_gets(buf); smi.meta_refcount = atoi(buf);
+ client_gets(smi.meta_content_type);
+ client_gets(buf); smi.meta_mod = atoi(buf);
lprintf(7, "message #%ld\n", msgnum);