drdynvc: Change channel processing to use streams
The channel processor in xrdp_channel.c for dynamic streams uses a data pointer and a length for passing PDUs or PDU fragments. We replace this with a standard stream pointer, so that the usual facilities can be used for checking length violcations.
This commit is contained in:
+3
-3
@@ -146,9 +146,9 @@ struct xrdp_drdynvc
|
||||
int (*open_response)(struct xrdp_process *id, int chan_id,
|
||||
int creation_status);
|
||||
int (*close_response)(struct xrdp_process *id, int chan_id);
|
||||
int (*data_first)(struct xrdp_process *id, int chan_id, char *data,
|
||||
int bytes, int total_bytes);
|
||||
int (*data)(struct xrdp_process *id, int chan_id, char *data, int bytes);
|
||||
int (*data_first)(struct xrdp_process *id, int chan_id, struct stream *s,
|
||||
int total_bytes);
|
||||
int (*data)(struct xrdp_process *id, int chan_id, struct stream *s);
|
||||
};
|
||||
|
||||
struct vc_dechunker; // Forward declaration
|
||||
|
||||
@@ -91,9 +91,9 @@ struct xrdp_drdynvc_procs
|
||||
int (*open_response)(struct xrdp_process *id, int chan_id,
|
||||
int creation_status);
|
||||
int (*close_response)(struct xrdp_process *id, int chan_id);
|
||||
int (*data_first)(struct xrdp_process *id, int chan_id,
|
||||
char *data, int bytes, int total_bytes);
|
||||
int (*data)(struct xrdp_process *id, int chan_id, char *data, int bytes);
|
||||
int (*data_first)(struct xrdp_process *id, int chan_id, struct stream *s,
|
||||
int total_bytes);
|
||||
int (*data)(struct xrdp_process *id, int chan_id, struct stream *s);
|
||||
};
|
||||
|
||||
/* Defined in xrdp_client_info.h */
|
||||
|
||||
@@ -488,8 +488,7 @@ drdynvc_process_data_first(struct xrdp_channel *self,
|
||||
drdynvc = self->drdynvcs + chan_id;
|
||||
if (drdynvc->data_first != NULL)
|
||||
{
|
||||
return drdynvc->data_first(session->id, chan_id, s->p,
|
||||
bytes, total_bytes);
|
||||
return drdynvc->data_first(session->id, chan_id, s, total_bytes);
|
||||
}
|
||||
LOG_DEVEL(LOG_LEVEL_WARNING, "Dynamic Virtual Channel %s (%d): "
|
||||
"callback 'data_first' is NULL",
|
||||
@@ -530,7 +529,7 @@ drdynvc_process_data(struct xrdp_channel *self,
|
||||
drdynvc = self->drdynvcs + chan_id;
|
||||
if (drdynvc->data != NULL)
|
||||
{
|
||||
return drdynvc->data(session->id, chan_id, s->p, bytes);
|
||||
return drdynvc->data(session->id, chan_id, s);
|
||||
}
|
||||
LOG_DEVEL(LOG_LEVEL_WARNING, "Dynamic Virtual Channel %s (%d): "
|
||||
"callback 'data' is NULL",
|
||||
|
||||
Reference in New Issue
Block a user