Changeset 132 for trunk/src/sh_socket.c
- Timestamp:
- Oct 23, 2007, 11:44:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_socket.c
r118 r132 342 342 #endif 343 343 struct stat buf; 344 char errbuf[SH_ERRBUF_SIZE]; 344 345 345 346 SL_ENTER(_("sh_socket_open_int")); … … 364 365 { 365 366 sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 366 sh_error_message (errno ),367 sh_error_message (errno, errbuf, sizeof(errbuf)), 367 368 _("sh_socket_open_int: socket")); 368 369 SL_RETURN( (-1), _("sh_socket_open_int")); … … 405 406 close(pf_unix_fd); pf_unix_fd = -1; 406 407 sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 407 sh_error_message (errno ),408 sh_error_message (errno, errbuf, sizeof(errbuf)), 408 409 _("sh_socket_open_int: bind")); 409 410 SL_RETURN( (-1), _("sh_socket_open_int")); … … 416 417 close(pf_unix_fd); pf_unix_fd = -1; 417 418 sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 418 sh_error_message (errno ),419 sh_error_message (errno, errbuf, sizeof(errbuf)), 419 420 _("sh_socket_open_int: setsockopt")); 420 421 SL_RETURN( (-1), _("sh_socket_open_int")); … … 427 428 close(pf_unix_fd); pf_unix_fd = -1; 428 429 sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 429 sh_error_message (errno ),430 sh_error_message (errno, errbuf, sizeof(errbuf)), 430 431 _("sh_socket_open_int: fcntl1")); 431 432 SL_RETURN( (-1), _("sh_socket_open_int")); … … 437 438 close(pf_unix_fd); pf_unix_fd = -1; 438 439 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 439 sh_error_message (errno ),440 sh_error_message (errno, errbuf, sizeof(errbuf)), 440 441 _("sh_socket_open_int: fcntl2")); 441 442 SL_RETURN( (-1), _("sh_socket_open_int")); … … 446 447 close(pf_unix_fd); pf_unix_fd = -1; 447 448 sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 448 sh_error_message (errno ),449 sh_error_message (errno, errbuf, sizeof(errbuf)), 449 450 _("sh_socket_open_int: listen")); 450 451 SL_RETURN( (-1), _("sh_socket_open_int")); … … 509 510 510 511 int client_uid = -1; 512 char errbuf[SH_ERRBUF_SIZE]; 511 513 512 514 … … 588 590 { 589 591 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 590 sh_error_message (errno ),592 sh_error_message (errno, errbuf, sizeof(errbuf)), 591 593 _("sh_socket_read: accept")); 592 594 return -1; … … 602 604 { 603 605 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 604 sh_error_message (errno ),606 sh_error_message (errno, errbuf, sizeof(errbuf)), 605 607 _("sh_socket_read: setsockopt")); 606 608 close(talkfd); … … 615 617 { 616 618 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 617 sh_error_message (errno ),619 sh_error_message (errno, errbuf, sizeof(errbuf)), 618 620 _("sh_socket_read: recvmsg")); 619 621 close(talkfd); … … 644 646 } 645 647 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 646 sh_error_message (errno ),648 sh_error_message (errno, errbuf, sizeof(errbuf)), 647 649 _("sh_socket_read: recvfrom")); 648 650 close(talkfd); … … 654 656 { 655 657 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 656 sh_error_message (errno ),658 sh_error_message (errno, errbuf, sizeof(errbuf)), 657 659 _("sh_socket_read: getpeereid")); 658 660 close(talkfd); … … 665 667 { 666 668 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 667 sh_error_message (errno ),669 sh_error_message (errno, errbuf, sizeof(errbuf)), 668 670 _("sh_socket_read: getsockopt")); 669 671 close(talkfd); … … 843 845 { 844 846 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 845 sh_error_message (errno ),847 sh_error_message (errno, errbuf, sizeof(errbuf)), 846 848 _("sh_socket_read: send")); 847 849 return -1; … … 876 878 { 877 879 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 878 sh_error_message (errno ),880 sh_error_message (errno, errbuf, sizeof(errbuf)), 879 881 _("sh_socket_read: sendto")); 880 882 close(talkfd); … … 907 909 { 908 910 sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN, 909 sh_error_message (errno ),911 sh_error_message (errno, errbuf, sizeof(errbuf)), 910 912 _("sh_socket_read: sendto")); 911 913 close(talkfd); … … 933 935 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 934 936 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 935 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));937 (void) sh_unix_time(0, new->cti, sizeof(new->cti)); 936 938 new->next = cmdlist; 937 939 cmdlist = new; … … 951 953 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 952 954 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 953 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));955 (void) sh_unix_time(0, new->cti, sizeof(new->cti)); 954 956 return; 955 957 } … … 960 962 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 961 963 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 962 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));964 (void) sh_unix_time(0, new->cti, sizeof(new->cti)); 963 965 new->next = runlist; 964 966 runlist = new;
Note:
See TracChangeset
for help on using the changeset viewer.