move some hard code paths to defines in header

ulab-next-nosound
Jay Sorg 10 years ago
parent e4d054654f
commit 8397055e8b

@ -45,4 +45,24 @@
#define XRDP_LOG_PATH "/var/log"
#endif
#if !defined(XRDP_CHANSRV_STR)
#define XRDP_CHANSRV_STR "/tmp/.xrdp/xrdp_chansrv_socket_%d"
#endif
#if !defined(CHANSRV_PORT_OUT_STR)
#define CHANSRV_PORT_OUT_STR "/tmp/.xrdp/xrdp_chansrv_audio_out_socket_%d"
#endif
#if !defined(CHANSRV_PORT_IN_STR)
#define CHANSRV_PORT_IN_STR "/tmp/.xrdp/xrdp_chansrv_audio_in_socket_%d"
#endif
#if !defined(CHANSRV_API_STR)
#define CHANSRV_API_STR "/tmp/.xrdp/xrdpapi_%d"
#endif
#if !defined(XRDP_X11RDP_STR)
#define XRDP_X11RDP_STR "/tmp/.xrdp/xrdp_display_%d"
#endif
#endif

@ -1013,8 +1013,7 @@ setup_listen(void)
{
g_lis_trans = trans_create(TRANS_MODE_UNIX, 8192, 8192);
g_lis_trans->is_term = g_is_term;
g_snprintf(port, 255, "/tmp/.xrdp/xrdp_chansrv_socket_%d",
7200 + g_display_num);
g_snprintf(port, 255, XRDP_CHANSRV_STR, g_display_num);
}
else
{
@ -1045,7 +1044,7 @@ setup_api_listen(void)
g_api_lis_trans = trans_create(TRANS_MODE_UNIX, 8192 * 4, 8192 * 4);
g_api_lis_trans->is_term = g_is_term;
g_snprintf(port, 255, "/tmp/.xrdp/xrdpapi_%d", g_display_num);
g_snprintf(port, 255, CHANSRV_API_STR, g_display_num);
g_api_lis_trans->trans_conn_in = my_api_trans_conn_in;
error = trans_listen(g_api_lis_trans, port);

@ -27,6 +27,7 @@
#include "thread_calls.h"
#include "defines.h"
#include "fifo.h"
#include "file_loc.h"
extern int g_rdpsnd_chan_id; /* in chansrv.c */
extern int g_display_num; /* in chansrv.c */
@ -52,9 +53,6 @@ int g_buf_index = 0;
int g_sent_time[256];
int g_sent_flag[256];
#define CHANSRV_PORT_OUT_STR "/tmp/.xrdp/xrdp_chansrv_audio_out_socket_%d"
#define CHANSRV_PORT_IN_STR "/tmp/.xrdp/xrdp_chansrv_audio_in_socket_%d"
struct xr_wave_format_ex
{
int wFormatTag;

@ -549,7 +549,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self)
if (use_uds)
{
g_snprintf(text, 255, "/tmp/.xrdp/xrdp_display_%d", self->display);
g_snprintf(text, 255, XRDP_X11RDP_STR, self->display);
}
else
{
@ -1233,7 +1233,7 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s)
/* connect channel redir */
if ((g_strcmp(ip, "127.0.0.1") == 0) || (ip[0] == 0))
{
g_snprintf(port, 255, "/tmp/.xrdp/xrdp_chansrv_socket_%d", 7200 + display);
g_snprintf(port, 255, XRDP_CHANSRV_STR, display);
}
else
{

Loading…
Cancel
Save