Replace del_flag' and
retr_flag' with `flags'.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4794 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -27,12 +27,12 @@ pop_dele (POP *p)
|
|||||||
mp = &(p->mlp[msg_num-1]);
|
mp = &(p->mlp[msg_num-1]);
|
||||||
|
|
||||||
/* Is the message already flagged for deletion? */
|
/* Is the message already flagged for deletion? */
|
||||||
if (mp->del_flag)
|
if (mp->flags & DEL_FLAG)
|
||||||
return (pop_msg (p,POP_FAILURE,"Message %d has already been deleted.",
|
return (pop_msg (p,POP_FAILURE,"Message %d has already been deleted.",
|
||||||
msg_num));
|
msg_num));
|
||||||
|
|
||||||
/* Flag the message for deletion */
|
/* Flag the message for deletion */
|
||||||
mp->del_flag = TRUE;
|
mp->flags |= DEL_FLAG;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if(p->debug)
|
if(p->debug)
|
||||||
|
@@ -111,8 +111,7 @@ pop_dropinfo(POP *p)
|
|||||||
mp->length = 0;
|
mp->length = 0;
|
||||||
mp->lines = 0;
|
mp->lines = 0;
|
||||||
mp->offset = ftell(p->drop) - nchar;
|
mp->offset = ftell(p->drop) - nchar;
|
||||||
mp->del_flag = FALSE;
|
mp->flags = 0;
|
||||||
mp->retr_flag = FALSE;
|
|
||||||
#if defined(UIDL) || defined(XOVER)
|
#if defined(UIDL) || defined(XOVER)
|
||||||
mp->msg_id = 0;
|
mp->msg_id = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,7 +31,7 @@ pop_list (POP *p)
|
|||||||
mp = &p->mlp[msg_num-1];
|
mp = &p->mlp[msg_num-1];
|
||||||
|
|
||||||
/* Is the message already flagged for deletion? */
|
/* Is the message already flagged for deletion? */
|
||||||
if (mp->del_flag)
|
if (mp->flags & DEL_FLAG)
|
||||||
return (pop_msg (p,POP_FAILURE,
|
return (pop_msg (p,POP_FAILURE,
|
||||||
"Message %d has been deleted.",msg_num));
|
"Message %d has been deleted.",msg_num));
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ pop_list (POP *p)
|
|||||||
|
|
||||||
/* Loop through the message information list. Skip deleted messages */
|
/* Loop through the message information list. Skip deleted messages */
|
||||||
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
||||||
if (!mp->del_flag)
|
if (!(mp->flags & DEL_FLAG))
|
||||||
fprintf(p->output,"%u %lu\r\n",mp->number,mp->length);
|
fprintf(p->output,"%u %lu\r\n",mp->number,mp->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ pop_rset (POP *p)
|
|||||||
|
|
||||||
/* Unmark all the messages */
|
/* Unmark all the messages */
|
||||||
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++)
|
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++)
|
||||||
mp->del_flag = FALSE;
|
mp->flags &= ~DEL_FLAG;
|
||||||
|
|
||||||
/* Reset the messages-deleted and bytes-deleted counters */
|
/* Reset the messages-deleted and bytes-deleted counters */
|
||||||
p->msgs_deleted = 0;
|
p->msgs_deleted = 0;
|
||||||
|
@@ -10,7 +10,6 @@ RCSID("$Id$");
|
|||||||
/*
|
/*
|
||||||
* sendline: Send a line of a multi-line response to a client.
|
* sendline: Send a line of a multi-line response to a client.
|
||||||
*/
|
*/
|
||||||
static
|
|
||||||
void
|
void
|
||||||
pop_sendline(POP *p, char *buffer)
|
pop_sendline(POP *p, char *buffer)
|
||||||
{
|
{
|
||||||
@@ -67,7 +66,7 @@ pop_send(POP *p)
|
|||||||
mp = &p->mlp[msg_num-1];
|
mp = &p->mlp[msg_num-1];
|
||||||
|
|
||||||
/* Is the message flagged for deletion? */
|
/* Is the message flagged for deletion? */
|
||||||
if (mp->del_flag)
|
if (mp->flags & DEL_FLAG)
|
||||||
return (pop_msg (p,POP_FAILURE,
|
return (pop_msg (p,POP_FAILURE,
|
||||||
"Message %d has been deleted.",msg_num));
|
"Message %d has been deleted.",msg_num));
|
||||||
|
|
||||||
@@ -80,7 +79,7 @@ pop_send(POP *p)
|
|||||||
/* Assume that a RETR (retrieve) command was issued */
|
/* Assume that a RETR (retrieve) command was issued */
|
||||||
msg_lines = -1;
|
msg_lines = -1;
|
||||||
/* Flag the message as retreived */
|
/* Flag the message as retreived */
|
||||||
mp->retr_flag = TRUE;
|
mp->flags |= RETR_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display the number of bytes in the message */
|
/* Display the number of bytes in the message */
|
||||||
|
@@ -64,7 +64,7 @@ pop_uidl (POP *p)
|
|||||||
mp = &p->mlp[msg_num-1];
|
mp = &p->mlp[msg_num-1];
|
||||||
|
|
||||||
/* Is the message already flagged for deletion? */
|
/* Is the message already flagged for deletion? */
|
||||||
if (mp->del_flag)
|
if (mp->flags & DEL_FLAG)
|
||||||
return (pop_msg (p,POP_FAILURE,
|
return (pop_msg (p,POP_FAILURE,
|
||||||
"Message %d has been deleted.",msg_num));
|
"Message %d has been deleted.",msg_num));
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ pop_uidl (POP *p)
|
|||||||
|
|
||||||
/* Loop through the message information list. Skip deleted messages */
|
/* Loop through the message information list. Skip deleted messages */
|
||||||
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
||||||
if (!mp->del_flag)
|
if (!(mp->flags & DEL_FLAG))
|
||||||
fprintf(p->output,"%u %s\r\n",mp->number,mp->msg_id);
|
fprintf(p->output,"%u %s\r\n",mp->number,mp->msg_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ pop_updt (POP *p)
|
|||||||
/* Get a pointer to the message information list */
|
/* Get a pointer to the message information list */
|
||||||
mp = &p->mlp[msg_num];
|
mp = &p->mlp[msg_num];
|
||||||
|
|
||||||
if (mp->del_flag) {
|
if (mp->flags & DEL_FLAG) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if(p->debug)
|
if(p->debug)
|
||||||
pop_log(p,POP_DEBUG,
|
pop_log(p,POP_DEBUG,
|
||||||
@@ -131,7 +131,7 @@ pop_updt (POP *p)
|
|||||||
|
|
||||||
/* Update the message status */
|
/* Update the message status */
|
||||||
if (strncasecmp(buffer,"Status:",7) == 0) {
|
if (strncasecmp(buffer,"Status:",7) == 0) {
|
||||||
if (mp->retr_flag)
|
if (mp->flags & RETR_FLAG)
|
||||||
fputs("Status: RO\n",md);
|
fputs("Status: RO\n",md);
|
||||||
else
|
else
|
||||||
fputs(buffer, md);
|
fputs(buffer, md);
|
||||||
@@ -142,7 +142,7 @@ pop_updt (POP *p)
|
|||||||
if (*buffer == '\n') {
|
if (*buffer == '\n') {
|
||||||
doing_body = 1;
|
doing_body = 1;
|
||||||
if (status_written == 0) {
|
if (status_written == 0) {
|
||||||
if (mp->retr_flag)
|
if (mp->flags & RETR_FLAG)
|
||||||
fputs("Status: RO\n\n",md);
|
fputs("Status: RO\n\n",md);
|
||||||
else
|
else
|
||||||
fputs("Status: U\n\n",md);
|
fputs("Status: U\n\n",md);
|
||||||
|
@@ -15,7 +15,7 @@ pop_xover (POP *p)
|
|||||||
|
|
||||||
/* Loop through the message information list. Skip deleted messages */
|
/* Loop through the message information list. Skip deleted messages */
|
||||||
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
||||||
if (!mp->del_flag)
|
if (!(mp->flags & DEL_FLAG))
|
||||||
fprintf(p->output,"%u\t%s\t%s\t%s\t%s\t%lu\t%u\r\n",
|
fprintf(p->output,"%u\t%s\t%s\t%s\t%s\t%lu\t%u\r\n",
|
||||||
mp->number,
|
mp->number,
|
||||||
mp->subject,
|
mp->subject,
|
||||||
|
Reference in New Issue
Block a user