/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/vchannel.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/seamlessrdp/ServerExe/vchannel.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1091 by astrand, Fri Mar 10 09:12:36 2006 UTC revision 1113 by ossman_, Fri Mar 10 16:40:57 2006 UTC
# Line 32  Line 32 
32    
33  #define CHANNELNAME "seamrdp"  #define CHANNELNAME "seamrdp"
34    
35    #define INVALID_CHARS ","
36    #define REPLACEMENT_CHAR '_'
37    
38  static HANDLE g_mutex = NULL;  static HANDLE g_mutex = NULL;
39  static HANDLE g_vchannel = NULL;  static HANDLE g_vchannel = NULL;
40    
# Line 47  debug(char *format, ...) Line 50  debug(char *format, ...)
50          _vsnprintf(buf + sizeof("DEBUG,") - 1, sizeof(buf) - sizeof("DEBUG,") + 1, format, argp);          _vsnprintf(buf + sizeof("DEBUG,") - 1, sizeof(buf) - sizeof("DEBUG,") + 1, format, argp);
51          va_end(argp);          va_end(argp);
52    
53            vchannel_strfilter(buf + sizeof("DEBUG,"));
54    
55          vchannel_write(buf);          vchannel_write(buf);
56  }  }
57    
# Line 202  vchannel_unblock() Line 207  vchannel_unblock()
207  {  {
208          ReleaseMutex(g_mutex);          ReleaseMutex(g_mutex);
209  }  }
210    
211    const char *
212    vchannel_strfilter(char *string)
213    {
214            char *c;
215    
216            for (c = string; *c != '\0'; c++)
217            {
218                    if ((*c < 0x20) || (strchr(INVALID_CHARS, *c) != NULL))
219                            *c = REPLACEMENT_CHAR;
220            }
221    
222            return string;
223    }

Legend:
Removed from v.1091  
changed lines
  Added in v.1113

  ViewVC Help
Powered by ViewVC 1.1.26