summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-09-07 22:54:40 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-09-07 22:54:40 +0300
commit420212a69bba00b4474b26d8da66ee338b8f771f (patch)
tree3684c8613b2f4fe8c33cb1f70df4e049d47d0ea2
parentf08e6e0842bae2dd575b085a8182cdd0f0d55cc5 (diff)
downloadmailutils-420212a69bba00b4474b26d8da66ee338b8f771f.tar.gz
mailutils-420212a69bba00b4474b26d8da66ee338b8f771f.tar.bz2
Rename XSCRIPT_ macros to MU_XSCRIPT.stream-cleanup
-rw-r--r--examples/pop3client.c16
-rw-r--r--imap4d/fetch.c2
-rw-r--r--imap4d/imap4d.c3
-rw-r--r--imap4d/io.c4
-rw-r--r--imap4d/uid.c2
-rw-r--r--imap4d/util.c6
-rw-r--r--include/mailutils/stream.h6
-rw-r--r--libproto/pop/mbox.c4
-rw-r--r--libproto/pop/pop3_pass.c6
-rw-r--r--libproto/pop/pop3_retr.c4
-rw-r--r--libproto/pop/pop3_stream.c2
-rw-r--r--libproto/pop/pop3_top.c4
-rw-r--r--libproto/pop/pop3_trace.c2
-rw-r--r--mailbox/xscript-stream.c4
-rw-r--r--pop3d/extra.c6
-rw-r--r--pop3d/retr.c2
-rw-r--r--pop3d/top.c2
-rw-r--r--pop3d/user.c2
18 files changed, 39 insertions, 38 deletions
diff --git a/examples/pop3client.c b/examples/pop3client.c
index 4450f2243..c9246381e 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -519,9 +519,9 @@ static int
519string_to_xlev (const char *name, int *pv) 519string_to_xlev (const char *name, int *pv)
520{ 520{
521 if (strcmp (name, "secure") == 0) 521 if (strcmp (name, "secure") == 0)
522 *pv = XSCRIPT_SECURE; 522 *pv = MU_XSCRIPT_SECURE;
523 else if (strcmp (name, "payload") == 0) 523 else if (strcmp (name, "payload") == 0)
524 *pv = XSCRIPT_PAYLOAD; 524 *pv = MU_XSCRIPT_PAYLOAD;
525 else 525 else
526 return 1; 526 return 1;
527 return 0; 527 return 0;
@@ -568,12 +568,12 @@ set_verbose_mask (mu_pop3_t p)
568{ 568{
569 if (p) 569 if (p)
570 { 570 {
571 mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (XSCRIPT_SECURE) 571 mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (MU_XSCRIPT_SECURE)
572 ? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR, 572 ? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR,
573 XSCRIPT_SECURE); 573 MU_XSCRIPT_SECURE);
574 mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (XSCRIPT_PAYLOAD) 574 mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (MU_XSCRIPT_PAYLOAD)
575 ? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR, 575 ? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR,
576 XSCRIPT_PAYLOAD); 576 MU_XSCRIPT_PAYLOAD);
577 } 577 }
578} 578}
579 579
@@ -589,12 +589,12 @@ com_verbose (int argc, char **argv)
589 { 589 {
590 char *delim = " ("; 590 char *delim = " (";
591 591
592 if (QRY_VERBOSE_MASK (XSCRIPT_SECURE)) 592 if (QRY_VERBOSE_MASK (MU_XSCRIPT_SECURE))
593 { 593 {
594 printf("%ssecure", delim); 594 printf("%ssecure", delim);
595 delim = ", "; 595 delim = ", ";
596 } 596 }
597 if (QRY_VERBOSE_MASK (XSCRIPT_PAYLOAD)) 597 if (QRY_VERBOSE_MASK (MU_XSCRIPT_PAYLOAD))
598 printf("%spayload", delim); 598 printf("%spayload", delim);
599 printf (")"); 599 printf (")");
600 } 600 }
diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index 8f9339d51..04cf8c6dd 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -1688,7 +1688,7 @@ imap4d_fetch (struct imap4d_command *command, imap4d_tokbuf_t tok)
1688{ 1688{
1689 int rc; 1689 int rc;
1690 char *err_text = "Completed"; 1690 char *err_text = "Completed";
1691 int xlev = set_xscript_level (XSCRIPT_PAYLOAD); 1691 int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
1692 rc = imap4d_fetch0 (tok, 0, &err_text); 1692 rc = imap4d_fetch0 (tok, 0, &err_text);
1693 set_xscript_level (xlev); 1693 set_xscript_level (xlev);
1694 return io_completion_response (command, rc, "%s", err_text); 1694 return io_completion_response (command, rc, "%s", err_text);
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 340c2bb15..a5b29e0ed 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -422,7 +422,8 @@ imap4d_mainloop (int fd, FILE *infile, FILE *outfile)
422 RESP_PREAUTH : RESP_OK, "%s", text); 422 RESP_PREAUTH : RESP_OK, "%s", text);
423 io_flush (); 423 io_flush ();
424 424
425 set_xscript_level ((state == STATE_AUTH) ? XSCRIPT_NORMAL : XSCRIPT_SECURE); 425 set_xscript_level ((state == STATE_AUTH) ?
426 MU_XSCRIPT_NORMAL : MU_XSCRIPT_SECURE);
426 427
427 tokp = imap4d_tokbuf_init (); 428 tokp = imap4d_tokbuf_init ();
428 while (1) 429 while (1)
diff --git a/imap4d/io.c b/imap4d/io.c
index fcae10707..726cfaa0d 100644
--- a/imap4d/io.c
+++ b/imap4d/io.c
@@ -243,7 +243,7 @@ io_format_completion_response (mu_stream_t str,
243 if (new_state != STATE_NONE) 243 if (new_state != STATE_NONE)
244 { 244 {
245 if (new_state == STATE_AUTH) 245 if (new_state == STATE_AUTH)
246 set_xscript_level (XSCRIPT_NORMAL); 246 set_xscript_level (MU_XSCRIPT_NORMAL);
247 state = new_state; 247 state = new_state;
248 } 248 }
249 249
@@ -574,7 +574,7 @@ imap4d_readline (struct imap4d_tokbuf *tok)
574 char *sp = NULL; 574 char *sp = NULL;
575 char *buf; 575 char *buf;
576 size_t len; 576 size_t len;
577 int xlev = set_xscript_level (XSCRIPT_PAYLOAD); 577 int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
578 578
579 number = strtoul (last_arg + 1, &sp, 10); 579 number = strtoul (last_arg + 1, &sp, 10);
580 /* Client can ask for non-synchronised literal, 580 /* Client can ask for non-synchronised literal,
diff --git a/imap4d/uid.c b/imap4d/uid.c
index 9d34b4609..e4e58590b 100644
--- a/imap4d/uid.c
+++ b/imap4d/uid.c
@@ -38,7 +38,7 @@ imap4d_uid (struct imap4d_command *command, imap4d_tokbuf_t tok)
38 38
39 if (mu_c_strcasecmp (cmd, "FETCH") == 0) 39 if (mu_c_strcasecmp (cmd, "FETCH") == 0)
40 { 40 {
41 int xlev = set_xscript_level (XSCRIPT_PAYLOAD); 41 int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
42 rc = imap4d_fetch0 (tok, 1, &err_text); 42 rc = imap4d_fetch0 (tok, 1, &err_text);
43 set_xscript_level (xlev); 43 set_xscript_level (xlev);
44 } 44 }
diff --git a/imap4d/util.c b/imap4d/util.c
index af081fecc..73d4031df 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -677,13 +677,13 @@ set_xscript_level (int xlev)
677{ 677{
678 if (imap4d_transcript) 678 if (imap4d_transcript)
679 { 679 {
680 if (xlev != XSCRIPT_NORMAL) 680 if (xlev != MU_XSCRIPT_NORMAL)
681 { 681 {
682 mu_log_level_t n = xlev == XSCRIPT_SECURE ? 682 mu_log_level_t n = xlev == MU_XSCRIPT_SECURE ?
683 MU_DEBUG_TRACE6 : MU_DEBUG_TRACE7; 683 MU_DEBUG_TRACE6 : MU_DEBUG_TRACE7;
684 684
685 if (mu_global_debug_level ("imap4") & MU_DEBUG_LEVEL_MASK (n)) 685 if (mu_global_debug_level ("imap4") & MU_DEBUG_LEVEL_MASK (n))
686 return XSCRIPT_NORMAL; 686 return MU_XSCRIPT_NORMAL;
687 } 687 }
688 688
689 if (mu_stream_ioctl (iostream, MU_IOCTL_LEVEL, &xlev) == 0) 689 if (mu_stream_ioctl (iostream, MU_IOCTL_LEVEL, &xlev) == 0)
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index ab1d9c4d7..0d506025c 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -157,9 +157,9 @@ int mu_tcp_stream_create (mu_stream_t *stream, const char *host, int port,
157 int flags); 157 int flags);
158 158
159/* Transcript output levels */ 159/* Transcript output levels */
160#define XSCRIPT_NORMAL 0 /* Normal transcript */ 160#define MU_XSCRIPT_NORMAL 0 /* Normal transcript */
161#define XSCRIPT_SECURE 1 /* Security-related data are being sent/received */ 161#define MU_XSCRIPT_SECURE 1 /* Security-related data are being transmitted */
162#define XSCRIPT_PAYLOAD 2 /* Actual payload (may be copious) */ 162#define MU_XSCRIPT_PAYLOAD 2 /* Actual payload (may be copious) */
163 163
164int mu_xscript_stream_create(mu_stream_t *pref, mu_stream_t transport, 164int mu_xscript_stream_create(mu_stream_t *pref, mu_stream_t transport,
165 mu_stream_t logstr, 165 mu_stream_t logstr,
diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c
index 68e2d93db..f5132957c 100644
--- a/libproto/pop/mbox.c
+++ b/libproto/pop/mbox.c
@@ -162,9 +162,9 @@ pop_open (mu_mailbox_t mbox, int flags)
162 if (mu_debug_check_level (mbox->debug, MU_DEBUG_PROT)) 162 if (mu_debug_check_level (mbox->debug, MU_DEBUG_PROT))
163 mu_pop3_trace (mpd->pop3, MU_POP3_TRACE_SET); 163 mu_pop3_trace (mpd->pop3, MU_POP3_TRACE_SET);
164 if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE6)) 164 if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE6))
165 mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, XSCRIPT_SECURE); 165 mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, MU_XSCRIPT_SECURE);
166 if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE7)) 166 if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE7))
167 mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, XSCRIPT_PAYLOAD); 167 mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, MU_XSCRIPT_PAYLOAD);
168 168
169 do 169 do
170 { 170 {
diff --git a/libproto/pop/pop3_pass.c b/libproto/pop/pop3_pass.c
index 30f823f96..d72c511f2 100644
--- a/libproto/pop/pop3_pass.c
+++ b/libproto/pop/pop3_pass.c
@@ -35,10 +35,10 @@ mu_pop3_pass (mu_pop3_t pop3, const char *passwd)
35 switch (pop3->state) 35 switch (pop3->state)
36 { 36 {
37 case MU_POP3_NO_STATE: 37 case MU_POP3_NO_STATE:
38 if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, XSCRIPT_SECURE)) 38 if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, MU_XSCRIPT_SECURE))
39 _mu_pop3_xscript_level (pop3, XSCRIPT_SECURE); 39 _mu_pop3_xscript_level (pop3, MU_XSCRIPT_SECURE);
40 status = mu_pop3_writeline (pop3, "PASS %s\r\n", passwd); 40 status = mu_pop3_writeline (pop3, "PASS %s\r\n", passwd);
41 _mu_pop3_xscript_level (pop3, XSCRIPT_NORMAL); 41 _mu_pop3_xscript_level (pop3, MU_XSCRIPT_NORMAL);
42 MU_POP3_CHECK_ERROR (pop3, status); 42 MU_POP3_CHECK_ERROR (pop3, status);
43 /* FIXME: how to obscure the passwd in the stream buffer? */ 43 /* FIXME: how to obscure the passwd in the stream buffer? */
44 MU_POP3_FCLR (pop3, MU_POP3_ACK); 44 MU_POP3_FCLR (pop3, MU_POP3_ACK);
diff --git a/libproto/pop/pop3_retr.c b/libproto/pop/pop3_retr.c
index fc454da93..aca24da65 100644
--- a/libproto/pop/pop3_retr.c
+++ b/libproto/pop/pop3_retr.c