Changeset 7507 for lang/c

Show
Ignore:
Timestamp:
03/05/08 20:47:35 (5 years ago)
Author:
frsyuki
Message:

lang/c/partty: fixed some mistakes about telnet implementation

Location:
lang/c/partty/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/c/partty/trunk/emtelnet.cc

    r7485 r7507  
    327327                // I can't use the option 
    328328                // reply wont 
    329                 if( m_my_option_handler[(size_t)c] ) { 
    330                         m_my_option_handler[(size_t)c](c, false, *this); 
     329                if( m_partner_option_handler[(size_t)c] ) { 
     330                        m_partner_option_handler[(size_t)c](c, false, *this); 
    331331                } 
    332332                owrite3(IAC, WONT, c); 
     
    368368                // will is sent and receive dont 
    369369                // I can't use the option 
     370                m_do_waiting.reset(c); 
    370371                if( m_my_option_handler[(size_t)c] ) { 
    371372                        m_my_option_handler[(size_t)c](c, false, *this); 
     
    386387{ 
    387388        //fprintf(stderr, "sb %u\n", c); 
    388         m_sb_buffer[0] = c; 
    389         m_sb_length = 1; 
    390389        sb_reset(c); 
    391390        m_istate = &emtelnet::istate_SB_MSG; 
  • lang/c/partty/trunk/multiplexer.cc

    r7485 r7507  
    6969                        if( host.ws_initialized() ) { 
    7070                                char sbbuf[4]; 
    71                                 *((short*)sbbuf) = htons(host.get_rows()); 
    72                                 *((short*)(sbbuf+2)) = htons(host.get_cols()); 
     71                                *((short*)sbbuf) = htons(host.get_cols()); 
     72                                *((short*)(sbbuf+2)) = htons(host.get_rows()); 
    7373                                self.send_ws(sbbuf, sizeof(sbbuf)); 
    7474                        }