Module testing now OK

This commit is contained in:
matt335672
2021-06-22 13:38:46 +01:00
parent c9afd804a4
commit d4c81229ba
21 changed files with 243 additions and 195 deletions
+2 -3
View File
@@ -140,9 +140,9 @@ int main(int argc, char **argv)
LOG_DEVEL(LOG_LEVEL_DEBUG, "Connecting to %s:%s with user %s (%s)", serv, port, user, pass);
if (0 != g_tcp_connect(sock, serv, port))
if (0 != trans_connect(t, serv, port, 3000))
{
LOG_DEVEL(LOG_LEVEL_DEBUG, "g_tcp_connect() error");
LOG(LOG_LEVEL_ERROR, "trans_connect() error");
return 1;
}
@@ -167,7 +167,6 @@ int main(int argc, char **argv)
cmndKill(t, s);
}
g_tcp_close(sock);
scp_session_destroy(s);
trans_delete(t);
log_end();
+1
View File
@@ -504,6 +504,7 @@ handle_scpv0_auth_reply(int sck)
int data;
int display;
in_s->end = in_s->data + 8;
in_uint32_be(in_s, version);
in_uint32_be(in_s, size);
if (version == 0 && size >= 14)
+7 -10
View File
@@ -41,18 +41,17 @@ 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;
struct log_config *logging;
int end;
int scnt;
int idx;
int sel;
int sock;
log.enable_syslog = 0;
log.log_level = LOG_LEVEL_DEBUG;
log.program_name = "sestest";
log.log_file = g_strdup("sestest.log");
log_start_from_param(&log);
logging = log_config_init_for_console(LOG_LEVEL_INFO, NULL);
log_start_from_param(logging);
log_config_free(logging);
scp_init();
sock = g_tcp_socket();
@@ -64,7 +63,7 @@ int main(int argc, char **argv)
s = scp_session_create();
t = scp_trans_create(sock);
if (0 != g_tcp_connect(sock, "localhost", "3350"))
if (0 != trans_connect(t, "localhost", "3350", 3000))
{
g_printf("error connecting");
return 1;
@@ -173,11 +172,9 @@ int main(int argc, char **argv)
}
}
g_tcp_close(sock);
scp_session_destroy(s);
trans_delete(t);
/*free_stream(c.in_s);
free_stream(c.out_s);*/
log_end();
return 0;
}