/[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 733 by jsorg71, Mon Jul 5 19:09:07 2004 UTC revision 1372 by jsorg71, Mon Jan 8 04:47:06 2007 UTC
# Line 1  Line 1 
1  /* -*- c-basic-offset: 8 -*-  /* -*- c-basic-offset: 8 -*-
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Protocol services - ISO layer     Protocol services - ISO layer
4     Copyright (C) Matthew Chapman 1999-2002     Copyright (C) Matthew Chapman 1999-2007
5      
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.     (at your option) any later version.
10      
11     This program is distributed in the hope that it will be useful,     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.     GNU General Public License for more details.
15      
16     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software     along with this program; if not, write to the Free Software
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Line 168  iso_recv(uint8 * rdpver) Line 168  iso_recv(uint8 * rdpver)
168  }  }
169    
170  /* Establish a connection up to the ISO layer */  /* Establish a connection up to the ISO layer */
171  BOOL  RD_BOOL
172  iso_connect(char *server, char *username)  iso_connect(char *server, char *username)
173  {  {
174          uint8 code = 0;          uint8 code = 0;
# Line 191  iso_connect(char *server, char *username Line 191  iso_connect(char *server, char *username
191          return True;          return True;
192  }  }
193    
194    /* Establish a reconnection up to the ISO layer */
195    RD_BOOL
196    iso_reconnect(char *server)
197    {
198            uint8 code = 0;
199    
200            if (!tcp_connect(server))
201                    return False;
202    
203            iso_send_msg(ISO_PDU_CR);
204    
205            if (iso_recv_msg(&code, NULL) == NULL)
206                    return False;
207    
208            if (code != ISO_PDU_CC)
209            {
210                    error("expected CC, got 0x%x\n", code);
211                    tcp_disconnect();
212                    return False;
213            }
214    
215            return True;
216    }
217    
218  /* Disconnect from the ISO layer */  /* Disconnect from the ISO layer */
219  void  void
220  iso_disconnect(void)  iso_disconnect(void)
# Line 198  iso_disconnect(void) Line 222  iso_disconnect(void)
222          iso_send_msg(ISO_PDU_DR);          iso_send_msg(ISO_PDU_DR);
223          tcp_disconnect();          tcp_disconnect();
224  }  }
225    
226    /* reset the state to support reconnecting */
227    void
228    iso_reset_state(void)
229    {
230            tcp_reset_state();
231    }

Legend:
Removed from v.733  
changed lines
  Added in v.1372

  ViewVC Help
Powered by ViewVC 1.1.26