Changeset 132 for trunk/src/sh_portcheck.c
- Timestamp:
- Oct 23, 2007, 11:44:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_portcheck.c
r131 r132 608 608 int nerr; 609 609 #endif 610 char errbuf[SH_ERRBUF_SIZE]; 610 611 611 612 /* inet_aton(interface, &haddr); */ … … 627 628 nerr = errno; 628 629 sl_snprintf(errmsg, sizeof(errmsg), _("check port: %5d/udp on %15s: %s"), 629 port, inet_ntoa(haddr), sh_error_message(errno ));630 port, inet_ntoa(haddr), sh_error_message(errno, errbuf, sizeof(errbuf))); 630 631 sh_error_handle((-1), FIL__, __LINE__, nerr, MSG_E_SUBGEN, 631 632 errmsg, _("connect")); … … 693 694 int nerr; 694 695 #endif 695 696 char errbuf[SH_ERRBUF_SIZE]; 696 697 697 698 /* inet_aton(interface, &haddr); */ … … 719 720 nerr = errno; 720 721 sl_snprintf(errmsg, sizeof(errmsg), _("check port: %5d/tcp on %15s: %s"), 721 port, inet_ntoa(haddr), sh_error_message(errno ));722 port, inet_ntoa(haddr), sh_error_message(errno, errbuf, sizeof(errbuf))); 722 723 sh_error_handle((-1), FIL__, __LINE__, nerr, MSG_E_SUBGEN, 723 724 errmsg, _("connect")); … … 889 890 int flag = 1; /* non-zero to enable an option */ 890 891 struct in_addr haddr; 891 892 char errbuf[SH_ERRBUF_SIZE]; 893 892 894 /* Check all interfaces for this host 893 895 */ … … 901 903 #else 902 904 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 903 sh_error_message(errno ), _("socket"));905 sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket")); 904 906 #endif 905 907 } … … 912 914 #else 913 915 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 914 sh_error_message(errno ),_("setsockopt"));916 sh_error_message(errno, errbuf, sizeof(errbuf)),_("setsockopt")); 915 917 #endif 916 918 } … … 957 959 struct sockaddr_in addr; 958 960 int addrlen = sizeof(addr); 961 char errbuf[SH_ERRBUF_SIZE]; 959 962 960 963 if (min_port == -1) … … 973 976 #else 974 977 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 975 sh_error_message(errno ), _("socket"));978 sh_error_message(errno, errbuf, sizeof(errbuf)), _("socket")); 976 979 #endif 977 980 } … … 984 987 #else 985 988 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 986 sh_error_message(errno ),_("setsockopt"));989 sh_error_message(errno, errbuf, sizeof(errbuf)),_("setsockopt")); 987 990 #endif 988 991 } … … 1018 1021 #else 1019 1022 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 1020 sh_error_message(errno ), _("bind"));1023 sh_error_message(errno, errbuf, sizeof(errbuf)), _("bind")); 1021 1024 #endif 1022 1025 }
Note:
See TracChangeset
for help on using the changeset viewer.