/[rdesktop]/sourceforge.net/trunk/rdesktop/mcs.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 /sourceforge.net/trunk/rdesktop/mcs.c

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

revision 828 by stargo, Sun Mar 6 21:11:18 2005 UTC revision 977 by astrand, Mon Aug 8 19:15:57 2005 UTC
# Line 412  mcs_connect(char *server, STREAM mcs_dat Line 412  mcs_connect(char *server, STREAM mcs_dat
412          return False;          return False;
413  }  }
414    
415    /* Establish a connection up to the MCS layer */
416    BOOL
417    mcs_reconnect(char *server, STREAM mcs_data)
418    {
419            unsigned int i;
420    
421            if (!iso_reconnect(server))
422                    return False;
423    
424            mcs_send_connect_initial(mcs_data);
425            if (!mcs_recv_connect_response(mcs_data))
426                    goto error;
427    
428            mcs_send_edrq();
429    
430            mcs_send_aurq();
431            if (!mcs_recv_aucf(&g_mcs_userid))
432                    goto error;
433    
434            mcs_send_cjrq(g_mcs_userid + MCS_USERCHANNEL_BASE);
435    
436            if (!mcs_recv_cjcf())
437                    goto error;
438    
439            mcs_send_cjrq(MCS_GLOBAL_CHANNEL);
440            if (!mcs_recv_cjcf())
441                    goto error;
442    
443            for (i = 0; i < g_num_channels; i++)
444            {
445                    mcs_send_cjrq(g_channels[i].mcs_id);
446                    if (!mcs_recv_cjcf())
447                            goto error;
448            }
449            return True;
450    
451          error:
452            iso_disconnect();
453            return False;
454    }
455    
456  /* Disconnect from the MCS layer */  /* Disconnect from the MCS layer */
457  void  void
458  mcs_disconnect(void)  mcs_disconnect(void)
459  {  {
460          iso_disconnect();          iso_disconnect();
461  }  }
462    
463    /* reset the state of the mcs layer */
464    void
465    mcs_reset_state(void)
466    {
467            g_mcs_userid = 0;
468            iso_reset_state();
469    }

Legend:
Removed from v.828  
changed lines
  Added in v.977

  ViewVC Help
Powered by ViewVC 1.1.26