diff options
author | ilsimo <ilsimo> | 2007-09-17 15:28:51 +0000 |
---|---|---|
committer | ilsimo <ilsimo> | 2007-09-17 15:28:51 +0000 |
commit | f06f9591bccd8ddd900c6d6ce2b168818f5745db (patch) | |
tree | c40459c95a70b8eda8a1ee65142fa343ada7db96 /sesman/tools/sestest.c | |
parent | 8c3d20c3d56e745e017e347b4317ae0e036d7674 (diff) | |
download | xrdp-proprietary-f06f9591bccd8ddd900c6d6ce2b168818f5745db.tar.gz xrdp-proprietary-f06f9591bccd8ddd900c6d6ce2b168818f5745db.zip |
fixing sessvc starting code and removing SESMAN_SESSVC_FILE definition
Diffstat (limited to 'sesman/tools/sestest.c')
-rw-r--r-- | sesman/tools/sestest.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sesman/tools/sestest.c b/sesman/tools/sestest.c index ae23f616..bbbc98d1 100644 --- a/sesman/tools/sestest.c +++ b/sesman/tools/sestest.c @@ -13,7 +13,7 @@ unsigned int menuSelect(unsigned int choices); int main(int argc, char** argv) { struct SCP_SESSION s; - struct SCP_CONNECTION c; + struct SCP_CONNECTION* c; /*struct SCP_DISCONNECTED_SESSION ds;*/ struct SCP_DISCONNECTED_SESSION* dsl; enum SCP_CLIENT_STATES_E e; @@ -21,14 +21,17 @@ int main(int argc, char** argv) int scnt; int idx; int sel; + int sock; - make_stream(c.in_s); + sock=g_tcp_socket(); + c=scp_connection_create(sock); + /*make_stream(c.in_s); init_stream(c.in_s, 8192); make_stream(c.out_s); init_stream(c.out_s, 8192); - c.in_sck = g_tcp_socket(); + c.in_sck = g_tcp_socket();*/ - if (0!=g_tcp_connect(c.in_sck, "localhost", "3350")) + if (0!=g_tcp_connect(sock, "localhost", "3350")) { g_printf("error connecting"); return 1; @@ -78,7 +81,7 @@ int main(int argc, char** argv) break; case SCP_CLIENT_STATE_SESSION_LIST: g_printf("OK : session list needed\n"); - e=scp_v1c_get_session_list(&c, &scnt, &dsl); + e=scp_v1c_get_session_list(c, &scnt, &dsl); printf("Sessions: %d\n", scnt); for (idx=0; idx <scnt; idx++) { @@ -88,7 +91,7 @@ int main(int argc, char** argv) case SCP_CLIENT_STATE_LIST_OK: g_printf("OK : selecting a session:\n"); sel = menuSelect(scnt); - e=scp_v1c_select_session(&c, &s, dsl[sel-1].SID); + e=scp_v1c_select_session(c, &s, dsl[sel-1].SID); g_printf("\n return: %d \n", e); break; case SCP_CLIENT_STATE_RESEND_CREDENTIALS: @@ -97,7 +100,7 @@ int main(int argc, char** argv) scanf("%255s", s.username); g_printf(" password:"); scanf("%255s", s.password); - e=scp_v1c_resend_credentials(&c,&s); + e=scp_v1c_resend_credentials(c,&s); break; case SCP_CLIENT_STATE_CONNECTION_DENIED: g_printf("ERR: connection denied: %s\n", s.errstr); @@ -118,9 +121,10 @@ int main(int argc, char** argv) } } - g_tcp_close(c.in_sck); - free_stream(c.in_s); - free_stream(c.out_s); + g_tcp_close(sock); + scp_connection_destroy(c); + /*free_stream(c.in_s); + free_stream(c.out_s);*/ return 0; } |