summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_mcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxrdp/xrdp_mcs.c')
-rw-r--r--libxrdp/xrdp_mcs.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c
index d110c987..86212bb1 100644
--- a/libxrdp/xrdp_mcs.c
+++ b/libxrdp/xrdp_mcs.c
@@ -38,6 +38,7 @@ xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans,
self->server_mcs_data = server_mcs_data;
self->iso_layer = xrdp_iso_create(self, trans);
self->channel_list = list_create();
+ self->monitor_list = list_create();
DEBUG((" out xrdp_mcs_create"));
return self;
}
@@ -47,6 +48,7 @@ void APP_CC
xrdp_mcs_delete(struct xrdp_mcs *self)
{
struct mcs_channel_item *channel_item;
+ struct mcs_monitor_item *monitor_item;
int index;
int count;
@@ -66,6 +68,19 @@ xrdp_mcs_delete(struct xrdp_mcs *self)
}
list_delete(self->channel_list);
+
+ /* here we have to free the monitor items and anything in them */
+ count = self->monitor_list->count;
+
+ for (index = count - 1; index >= 0; index--)
+ {
+ monitor_item = (struct mcs_monitor_item *)
+ list_get_item(self->monitor_list, index);
+ g_free(monitor_item);
+ }
+
+ list_delete(self->monitor_list);
+
xrdp_iso_delete(self->iso_layer);
/* make sure we get null pointer exception if struct is used again. */
DEBUG(("xrdp_mcs_delete processed"))
@@ -436,6 +451,7 @@ xrdp_mcs_recv_edrq(struct xrdp_mcs *self)
int opcode;
struct stream *s;
+ DEBUG((" in xrdp_mcs_recv_edrq"));
make_stream(s);
init_stream(s, 8192);
@@ -485,6 +501,7 @@ xrdp_mcs_recv_edrq(struct xrdp_mcs *self)
}
free_stream(s);
+ DEBUG((" out xrdp_mcs_recv_edrq"));
return 0;
}
@@ -496,6 +513,7 @@ xrdp_mcs_recv_aurq(struct xrdp_mcs *self)
int opcode;
struct stream *s;
+ DEBUG((" in xrdp_mcs_recv_aurq"));
make_stream(s);
init_stream(s, 8192);
@@ -536,6 +554,7 @@ xrdp_mcs_recv_aurq(struct xrdp_mcs *self)
}
free_stream(s);
+ DEBUG((" out xrdp_mcs_recv_aurq"));
return 0;
}