From 315ef8ad71de3d7e6726e4bdf03cdd1f61d9a7d6 Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Sat, 18 May 2013 19:44:16 -0700 Subject: file system redirection: o touch was not working - fixed o echo "this is a string" > filename was not working - fixed o echo "this is a string" >> filename was not working - fixed o vi was not working - working now but swap files are not being deleted automatically - work in progress --- sesman/chansrv/irp.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'sesman/chansrv/irp.c') diff --git a/sesman/chansrv/irp.c b/sesman/chansrv/irp.c index 9faaabf5..5c21fe0f 100644 --- a/sesman/chansrv/irp.c +++ b/sesman/chansrv/irp.c @@ -31,7 +31,7 @@ #define LOG_DEBUG 2 #ifndef LOG_LEVEL -#define LOG_LEVEL LOG_DEBUG +#define LOG_LEVEL LOG_ERROR #endif #define log_error(_params...) \ @@ -95,6 +95,7 @@ IRP * devredir_irp_new() irp->prev = irp_last; } + log_debug("new IRP=%p", irp); return irp; } @@ -108,12 +109,12 @@ int devredir_irp_delete(IRP *irp) { IRP *lirp = g_irp_head; - log_debug("=== entered; completion_id=%d type=%d", - irp->CompletionId, irp->completion_type); - if ((irp == NULL) || (lirp == NULL)) return -1; + log_debug("irp=%p completion_id=%d type=%d", + irp, irp->CompletionId, irp->completion_type); + devredir_irp_dump(); // LK_TODO while (lirp) @@ -173,11 +174,15 @@ IRP *devredir_irp_find(tui32 completion_id) while (irp) { if (irp->CompletionId == completion_id) + { + log_debug("returning irp=%p", irp); return irp; + } irp = irp->next; } + log_debug("returning irp=NULL"); return NULL; } @@ -188,11 +193,15 @@ IRP * devredir_irp_find_by_fileid(tui32 FileId) while (irp) { if (irp->FileId == FileId) + { + log_debug("returning irp=%p", irp); return irp; + } irp = irp->next; } + log_debug("returning irp=NULL"); return NULL; } @@ -212,6 +221,7 @@ IRP * devredir_irp_get_last() irp = irp->next; } + log_debug("returning irp=%p", irp); return irp; } -- cgit v1.2.1