commit 27fa63a577cc23b87e78070a09ac22d28c8ea10d
Author: Oswald Buddenhagen <[email protected]>
Date:   Sun Dec 8 16:32:30 2013 +0100

    move verbose socket logging out of socket driver
    
    the way it's used, it's more of a high-level function.

 src/drv_imap.c |    8 ++++++++
 src/socket.c   |    4 ----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 9cd2c8d..1697fcb 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -701,6 +701,10 @@ parse_imap_list( imap_store_t *ctx, char **sp, 
parse_list_state_t *sts )
                  getline:
                        if (!(s = socket_read_line( &ctx->conn )))
                                goto postpone;
+                       if (DFlags & VERBOSE) {
+                               puts( s );
+                               fflush( stdout );
+                       }
                } else if (*s == '"') {
                        /* quoted string */
                        s++;
@@ -1162,6 +1166,10 @@ imap_socket_read( void *aux )
                }
                if (!(cmd = socket_read_line( &ctx->conn )))
                        return;
+               if (DFlags & VERBOSE) {
+                       puts( cmd );
+                       fflush( stdout );
+               }
 
                arg = next_arg( &cmd );
                if (!arg) {
diff --git a/src/socket.c b/src/socket.c
index 26249cd..c819395 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -591,10 +591,6 @@ socket_read_line( conn_t *b )
        if (p != s && p[-1] == '\r')
                p--;
        *p = 0;
-       if (DFlags & VERBOSE) {
-               puts( s );
-               fflush( stdout );
-       }
        return s;
 }
 

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to