summaryrefslogtreecommitdiffstats
path: root/xrdp/parse.h
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2004-09-17 04:05:17 +0000
committerjsorg71 <jsorg71>2004-09-17 04:05:17 +0000
commit77943e08f9f7702a070a462827d7d0d551a75ea4 (patch)
tree2778eb9c833b8e8f7243cd4a54e996955589d892 /xrdp/parse.h
parent2ed9412912adf4e61dbf64f598e8f439ac4683cf (diff)
downloadxrdp-proprietary-77943e08f9f7702a070a462827d7d0d551a75ea4.tar.gz
xrdp-proprietary-77943e08f9f7702a070a462827d7d0d551a75ea4.zip
pass struct stream around, don't use just one
Diffstat (limited to 'xrdp/parse.h')
-rw-r--r--xrdp/parse.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/xrdp/parse.h b/xrdp/parse.h
index 605486b6..05d0e4b3 100644
--- a/xrdp/parse.h
+++ b/xrdp/parse.h
@@ -35,6 +35,7 @@ struct stream
char* sec_hdr;
char* rdp_hdr;
char* channel_hdr;
+ char* next_packet;
};
#define s_check(s) (s->p <= s->end)
@@ -43,6 +44,11 @@ struct stream
#define s_check_end(s) (s->p == s->end)
+#define make_stream(s) \
+{ \
+ s = (struct stream*)g_malloc(sizeof(struct stream), 1); \
+} \
+
#define init_stream(s, v) \
{ \
if (v > s->size) \
@@ -53,8 +59,16 @@ struct stream
s->p = s->data; \
s->end = s->data; \
s->size = v; \
+ s->next_packet = 0; \
}
+#define free_stream(s) \
+{ \
+ if (s != 0) \
+ g_free(s->data); \
+ g_free(s); \
+} \
+
#define s_push_layer(s, h, n) \
{ \
s->h = s->p; \