Changeset 27 for trunk/src/sh_forward.c
- Timestamp:
- Apr 6, 2006, 8:55:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_forward.c
r22 r27 335 335 #endif 336 336 337 #if def SH_WITH_CLIENT337 #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER) 338 338 339 339 static int count_dev_server = 0; … … 708 708 static long sh_forward_try (char * errmsg); 709 709 710 static unsigned int ServerPort = SH_DEFAULT_PORT; 711 712 int sh_forward_server_port (const char * str) 713 { 714 unsigned long l; 715 char * endptr; 716 717 SL_ENTER(_("sh_forward_server_port")); 718 719 l = strtoul (str, &endptr, 0); 720 if (l > 65535 || endptr == str) 721 { 722 SL_RETURN (-1, _("sh_forward_server_port")); 723 } 724 ServerPort = (unsigned int) l; 725 SL_RETURN (0, _("sh_forward_server_port")); 726 } 710 727 711 728 long sh_forward (char * errmsg) … … 880 897 881 898 sockfd = connect_port_2 (sh.srvexport.name, sh.srvexport.alt, 882 S H_DEFAULT_PORT,899 ServerPort, 883 900 error_call, &error_num, error_msg, 256); 884 901 … … 1441 1458 flag_err, 1442 1459 MSG_TCP_NOCONF); 1443 } else { 1460 } 1461 #ifdef SH_WITH_CLIENT 1462 else { 1444 1463 sh_socket_server_cmd(buffer); 1445 1464 } 1465 #endif 1446 1466 flag_err = 0; 1447 1467
Note:
See TracChangeset
for help on using the changeset viewer.