Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

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

revision 5793 by doda, Sun Feb 22 13:04:28 2015 UTC revision 5799 by doda, Wed Feb 25 15:50:25 2015 UTC
# Line 1636  static void percent_decode(char *dst, in Line 1636  static void percent_decode(char *dst, in
1636          return;          return;
1637  }  }
1638    
1639    void add_forward_param(PTInstVar pvar, char *param)
1640    {
1641            if (pvar->settings.DefaultForwarding[0] == 0) {
1642                    strncpy_s(pvar->settings.DefaultForwarding,
1643                              sizeof(pvar->settings.DefaultForwarding),
1644                              param, _TRUNCATE);
1645            } else {
1646                    strncat_s(pvar->settings.DefaultForwarding,
1647                              sizeof(pvar->settings.DefaultForwarding),
1648                              ";", _TRUNCATE);
1649                    strncat_s(pvar->settings.DefaultForwarding,
1650                              sizeof(pvar->settings.DefaultForwarding),
1651                              param, _TRUNCATE);
1652            }
1653    }
1654    
1655  /* returns 1 if the option text must be deleted */  /* returns 1 if the option text must be deleted */
1656  static int parse_option(PTInstVar pvar, char FAR * option)  static int parse_option(PTInstVar pvar, char FAR * option)
1657  {  {
# Line 1646  static int parse_option(PTInstVar pvar, Line 1662  static int parse_option(PTInstVar pvar,
1662                          } else if (MATCH_STR(option + 4, "-L") == 0 ||                          } else if (MATCH_STR(option + 4, "-L") == 0 ||
1663                                     MATCH_STR(option + 4, "-R") == 0 ||                                     MATCH_STR(option + 4, "-R") == 0 ||
1664                                     _stricmp(option + 4, "-X") == 0) {                                     _stricmp(option + 4, "-X") == 0) {
1665                                  if (pvar->settings.DefaultForwarding[0] == 0) {                                  add_forward_param(pvar, option+5);
1666                                          strncpy_s(pvar->settings.DefaultForwarding,                          } else if (MATCH_STR(option + 4, "-X") == 0) {
1667                                                    sizeof(pvar->settings.DefaultForwarding),                                  add_forward_param(pvar, "X");
                                                   option + 5, _TRUNCATE);  
                                 } else {  
                                         strncat_s(pvar->settings.DefaultForwarding,  
                                                   sizeof(pvar->settings.DefaultForwarding),  
                                                   ";", _TRUNCATE);  
                                         strncat_s(pvar->settings.DefaultForwarding,  
                                                   sizeof(pvar->settings.DefaultForwarding),  
                                                   option + 5, _TRUNCATE);  
                                 }  
                         } else if (MATCH_STR(option + 4, "-display=") == 0) {  
1668                                  strncpy_s(pvar->settings.X11Display,                                  strncpy_s(pvar->settings.X11Display,
1669                                            sizeof(pvar->settings.X11Display),                                            sizeof(pvar->settings.X11Display),
1670                                            option + 13, _TRUNCATE);                                            option + 6, _TRUNCATE);
1671                          } else if (MATCH_STR(option + 4, "-f=") == 0) {                          } else if (MATCH_STR(option + 4, "-f=") == 0) {
1672                                  read_ssh_options_from_user_file(pvar, option + 7);                                  read_ssh_options_from_user_file(pvar, option + 7);
1673                          } else if (MATCH_STR(option + 4, "-v") == 0) {                          } else if (MATCH_STR(option + 4, "-v") == 0) {

Legend:
Removed from v.5793  
changed lines
  Added in v.5799

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26