Changeset 515 for branches/client-2.0/src/smbwrp.c
- Timestamp:
- Jan 10, 2011, 1:31:33 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/client-2.0/src/smbwrp.c
r497 r515 178 178 } 179 179 */ 180 /* 181 * Block SIGPIPE (from lib/util_sock.c: write()) 182 * It is not needed and should not stop execution 183 */ 184 BlockSignals(True, SIGPIPE); 185 180 186 return 0; 181 187 … … 574 580 if (!cli || !file || !*file->fname) 575 581 { 576 return EINVAL;582 return maperror(EINVAL); 577 583 } 578 584 if (file->denymode < DENY_ALL || file->denymode > DENY_NONE) … … 611 617 if (!cli || !file || !buf || !result) 612 618 { 613 return EINVAL;619 return maperror(EINVAL); 614 620 } 615 621 … … 637 643 if (!cli || !file || !buf || !result) 638 644 { 639 return EINVAL;645 return maperror(EINVAL); 640 646 } 641 647 … … 661 667 if (!cli || !file) 662 668 { 663 return EINVAL;669 return maperror(EINVAL); 664 670 } 665 671 … … 728 734 if (!cli || !file) 729 735 { 730 return EINVAL;736 return maperror(EINVAL); 731 737 } 732 738 … … 764 770 if (!cli || !oldname || !newname) 765 771 { 766 return EINVAL;772 return maperror(EINVAL); 767 773 } 768 774 … … 785 791 if (!cli || !finfo || !*finfo->fname) 786 792 { 787 return EINVAL;793 return maperror(EINVAL); 788 794 } 789 795 … … 804 810 if (!cli || !fname) 805 811 { 806 return EINVAL;812 return maperror(EINVAL); 807 813 } 808 814 #if 0 … … 835 841 if (!cli || !file) 836 842 { 837 return EINVAL;843 return maperror(EINVAL); 838 844 } 839 845 … … 844 850 if (offset < 0) 845 851 { 846 return EINVAL;852 return maperror(EINVAL); 847 853 } 848 854 file->offset = offset; … … 854 860 if (offset > 0) 855 861 { 856 return EINVAL;862 return maperror(EINVAL); 857 863 } 858 864 if (!cli_qfileinfo3(cli, file->fd, … … 866 872 file->offset = size + offset; 867 873 break; 868 default: return EINVAL;874 default: return maperror(EINVAL); 869 875 } 870 876 … … 881 887 if (!cli || !finfo || !*finfo->fname) 882 888 { 883 return EINVAL;889 return maperror(EINVAL); 884 890 } 885 891 debuglocal(4,"getattr %d %d <%s>\n", cli->capabilities & CAP_NOPATHINFO2, cli->capabilities & CAP_NT_SMBS, finfo->fname); … … 927 933 if (rc == EINVAL) 928 934 { 929 rc = ENOTDIR;935 rc = maperror(ENOTDIR); 930 936 } 931 937 return rc; … … 953 959 if (!cli || !file || !finfo) 954 960 { 955 return EINVAL;961 return maperror(EINVAL); 956 962 } 957 963 … … 1460 1466 if (!srv || !cli || !state || !*state->mask) 1461 1467 { 1462 return EINVAL;1468 return maperror(EINVAL); 1463 1469 } 1464 1470 debuglocal(1,"Filelist <%s> on master <%s> wgrp <%s> server <%s> share <%s> clidev <%s>\n", state->mask, srv->master, srv->workgroup, srv->server_name, srv->share_name, cli->dev); … … 1530 1536 if (!cli || !fname) 1531 1537 { 1532 return EINVAL;1538 return maperror(EINVAL); 1533 1539 } 1534 1540 … … 1540 1546 1541 1547 if (!(finfo.attr & aDIR)) { 1542 return ENOTDIR;1548 return maperror(ENOTDIR); 1543 1549 } 1544 1550 … … 1554 1560 if (!cli || !fname) 1555 1561 { 1556 return EINVAL;1562 return maperror(EINVAL); 1557 1563 } 1558 1564 … … 1571 1577 if (!cli || !fname) 1572 1578 { 1573 return EINVAL;1579 return maperror(EINVAL); 1574 1580 } 1575 1581 … … 1588 1594 if (!cli || !fname || !name) 1589 1595 { 1590 return EINVAL;1596 return maperror(EINVAL); 1591 1597 } 1592 1598 if (!cli_set_ea_path(cli, fname, name, value, size)) … … 1604 1610 if (!cli || !file || !name) 1605 1611 { 1606 return EINVAL;1612 return maperror(EINVAL); 1607 1613 } 1608 1614 if (!cli_set_ea_fnum(cli, file->fd, name, value, size)) … … 1703 1709 if (!cli || !fname || !buffer) 1704 1710 { 1705 return EINVAL;1711 return maperror(EINVAL); 1706 1712 } 1707 1713 … … 1717 1723 if (!cli || !file || !buffer) 1718 1724 { 1719 return EINVAL;1725 return maperror(EINVAL); 1720 1726 } 1721 1727 … … 1733 1739 if (!cli || !pfsa) 1734 1740 { 1735 return EINVAL;1741 return maperror(EINVAL); 1736 1742 } 1737 1743
Note:
See TracChangeset
for help on using the changeset viewer.