Move SCP synch calls from sesman tools to library

The sesman tools have some private functions to make syncronous calls
to sesman over SCP. This commit moves these calls to a new module
scp_sync in libipm so that they can be utilised by other parts of
xrdp (i.e. chansrv)
This commit is contained in:
matt335672
2024-09-13 11:57:15 +01:00
parent dd1dc7c630
commit 4d80cf6d77
8 changed files with 275 additions and 190 deletions
+4 -3
View File
@@ -40,7 +40,8 @@
#include "string_calls.h"
#include "guid.h"
#include "tools_common.h"
#include "scp.h"
#include "scp_sync.h"
// cppcheck doesn't always set this macro to something in double-quotes
#if defined(__cppcheck__)
@@ -453,7 +454,7 @@ handle_login_response(struct trans *t, int *server_closed)
{
enum scp_login_status login_result;
int rv = wait_for_sesman_reply(t, E_SCP_LOGIN_RESPONSE);
int rv = scp_sync_wait_specific(t, E_SCP_LOGIN_RESPONSE);
if (rv != 0)
{
*server_closed = 1;
@@ -511,7 +512,7 @@ handle_create_session_response(struct trans *t)
int display;
struct guid guid;
int rv = wait_for_sesman_reply(t, E_SCP_CREATE_SESSION_RESPONSE);
int rv = scp_sync_wait_specific(t, E_SCP_CREATE_SESSION_RESPONSE);
if (rv == 0)
{
rv = scp_get_create_session_response(t, &status,