diff options
author | ilsimo <ilsimo> | 2008-02-21 15:50:31 +0000 |
---|---|---|
committer | ilsimo <ilsimo> | 2008-02-21 15:50:31 +0000 |
commit | 57484bd7016c6e56854dc4c34ac0dc8077a07014 (patch) | |
tree | dc081809815ab499c9b8827fc92e7c2b7b03df09 /sesman/tools | |
parent | 4c9d3862e55ab5d6fa734549478bb0a00be9f7ed (diff) | |
download | xrdp-proprietary-57484bd7016c6e56854dc4c34ac0dc8077a07014.tar.gz xrdp-proprietary-57484bd7016c6e56854dc4c34ac0dc8077a07014.zip |
more work on logging
Diffstat (limited to 'sesman/tools')
-rw-r--r-- | sesman/tools/Makefile | 5 | ||||
-rw-r--r-- | sesman/tools/sestest.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/sesman/tools/Makefile b/sesman/tools/Makefile index 210bdc2c..29e419ae 100644 --- a/sesman/tools/Makefile +++ b/sesman/tools/Makefile @@ -1,6 +1,6 @@ # sesman tools makefile SESTESTOBJ = sestest.o \ - os_calls.o + os_calls.o log.o # d3des.o list.o file.o \ # libscp_v1c.o tcp.o @@ -15,7 +15,8 @@ DOCDIR = /usr/doc/xrdp DEFINES = -DLIBSCP_CLIENT -CFLAGS = -Wall -O2 -I../../common -I../ -I/usr/include/nptl -I../libscp $(DEFINES) +#CFLAGS = -Wall -O2 -I../../common -I../ -I/usr/include/nptl -I../libscp $(DEFINES) +CFLAGS = -Wall -g -I../../common -I../ -I/usr/include/nptl -I../libscp $(DEFINES) LDFLAGS = -L /usr/gnu/lib -I/usr/include/nptl -L/usr/lib/nptl -L../libscp -lpthread -ldl -lscp -Wl,-rpath,../libscp $(DEFINES) #LDFLAGS = -L /usr/gnu/lib -ldl $(DEFINES) C_OS_FLAGS = $(CFLAGS) -c -g diff --git a/sesman/tools/sestest.c b/sesman/tools/sestest.c index bbbc98d1..78f526b1 100644 --- a/sesman/tools/sestest.c +++ b/sesman/tools/sestest.c @@ -1,9 +1,14 @@ - +/* + * sestest.c - an scp_v1 testing tool + * (c) 2008 Simone Fedele + * + */ #include "arch.h" #include "tcp.h" #include "libscp.h" #include "parse.h" +#include "log.h" #include <stdio.h> @@ -17,12 +22,21 @@ int main(int argc, char** argv) /*struct SCP_DISCONNECTED_SESSION ds;*/ struct SCP_DISCONNECTED_SESSION* dsl; enum SCP_CLIENT_STATES_E e; + struct log_config log; int end; int scnt; int idx; int sel; int sock; + + log.enable_syslog=0; + log.log_level=99; + log.program_name=g_strdup("sestest"); + log.log_file=g_strdup("sestest.log"); + log_start(&log); + scp_init(&log); + sock=g_tcp_socket(); c=scp_connection_create(sock); /*make_stream(c.in_s); @@ -69,7 +83,7 @@ int main(int argc, char** argv) s.errstr=0; end=0; - e=scp_v1c_connect(&c,&s); + e=scp_v1c_connect(c,&s); while (!end) { |