summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/chansrv.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-06-23 14:17:59 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-06-23 14:17:59 -0700
commit0aa3dbe738ac892462776b73d037e7324e26d3cb (patch)
tree3bb555723185aa153690be67ef6534685d6d9aeb /sesman/chansrv/chansrv.c
parentd90431aeb5a299777db462c579718bb77f94bb8f (diff)
downloadxrdp-proprietary-0aa3dbe738ac892462776b73d037e7324e26d3cb.tar.gz
xrdp-proprietary-0aa3dbe738ac892462776b73d037e7324e26d3cb.zip
chansrv: no logic change, EOL and coding style cleanup
Diffstat (limited to 'sesman/chansrv/chansrv.c')
-rw-r--r--sesman/chansrv/chansrv.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c
index a3b3f913..bd9c27c5 100644
--- a/sesman/chansrv/chansrv.c
+++ b/sesman/chansrv/chansrv.c
@@ -314,6 +314,8 @@ process_message_channel_setup(struct stream *s)
int index;
int rv;
struct chan_item *ci;
+ struct chan_out_data *cod;
+ struct chan_out_data *old_cod;
g_num_chan_items = 0;
g_cliprdr_index = -1;
@@ -336,23 +338,25 @@ process_message_channel_setup(struct stream *s)
g_memset(ci->name, 0, sizeof(ci->name));
in_uint8a(s, ci->name, 8);
in_uint16_le(s, ci->id);
- // there might be leftover data from last session after reconnecting
- // so free it
- if (ci->head != 0) {
- struct chan_out_data* cod = ci->head;
- struct chan_out_data* old_cod;
- while (1) {
+ /* there might be leftover data from last session after reconnecting
+ so free it */
+ if (ci->head != 0)
+ {
+ cod = ci->head;
+ while (1)
+ {
free_stream(cod->s);
- old_cod = cod;
+ old_cod = cod;
cod = cod->next;
g_free(old_cod);
- if (ci->tail == old_cod) {
+ if (ci->tail == old_cod)
+ {
break;
- }
- }
- }
- ci->head = 0;
- ci->tail = 0;
+ }
+ }
+ }
+ ci->head = 0;
+ ci->tail = 0;
in_uint16_le(s, ci->flags);
LOGM((LOG_LEVEL_DEBUG, "process_message_channel_setup: chan name '%s' "
"id %d flags %8.8x", ci->name, ci->id, ci->flags));
@@ -403,8 +407,8 @@ process_message_channel_setup(struct stream *s)
if (g_rdpsnd_index >= 0)
{
- // gets reset to 1 by next send_data_from_chan_item
- g_sent = 0; // wait for response!
+ /* gets reset to 1 by next send_data_from_chan_item */
+ g_sent = 0; /* wait for response! */
sound_init();
}