/[rdesktop]/jpeg/rdesktop/trunk/iso.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jpeg/rdesktop/trunk/iso.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 32 by matty, Fri Sep 14 13:51:38 2001 UTC revision 33 by matty, Sat Sep 15 12:34:34 2001 UTC
# Line 52  iso_recv_msg(uint8 *code) Line 52  iso_recv_msg(uint8 *code)
52    
53          s = tcp_recv(4);          s = tcp_recv(4);
54          if (s == NULL)          if (s == NULL)
55                  return False;                  return NULL;
56    
57          in_uint8(s, version);          in_uint8(s, version);
58          if (version != 3)          if (version != 3)
59          {          {
60                  error("TPKT v%d\n", version);                  error("TPKT v%d\n", version);
61                  return False;                  return NULL;
62          }          }
63    
64          in_uint8s(s, 1);        /* pad */          in_uint8s(s, 1);        /* pad */
# Line 66  iso_recv_msg(uint8 *code) Line 66  iso_recv_msg(uint8 *code)
66    
67          s = tcp_recv(length - 4);          s = tcp_recv(length - 4);
68          if (s == NULL)          if (s == NULL)
69                  return False;                  return NULL;
70    
71          in_uint8s(s, 1);        /* hdrlen */          in_uint8s(s, 1);        /* hdrlen */
72          in_uint8(s, *code);          in_uint8(s, *code);
# Line 121  iso_recv() Line 121  iso_recv()
121          uint8 code;          uint8 code;
122    
123          s = iso_recv_msg(&code);          s = iso_recv_msg(&code);
124          if ((s == NULL) || (code != ISO_PDU_DT))          if (s == NULL)
125                    return NULL;
126    
127            if (code != ISO_PDU_DT)
128          {          {
129                  error("expected DT, got %d\n", code);                  error("expected DT, got 0x%x\n", code);
130                  return False;                  return NULL;
131          }          }
132    
133          return s;          return s;
# Line 141  iso_connect(char *server) Line 144  iso_connect(char *server)
144    
145          iso_send_msg(ISO_PDU_CR);          iso_send_msg(ISO_PDU_CR);
146    
147          if ((iso_recv_msg(&code) == NULL) || (code != ISO_PDU_CC))          if (iso_recv_msg(&code) == NULL)
148                    return False;
149    
150            if (code != ISO_PDU_CC)
151          {          {
152                  error("expected CC, got %d\n", code);                  error("expected CC, got 0x%x\n", code);
153                  tcp_disconnect();                  tcp_disconnect();
154                  return False;                  return False;
155          }          }

Legend:
Removed from v.32  
changed lines
  Added in v.33

  ViewVC Help
Powered by ViewVC 1.1.26