Changeset 962 for trunk/src/core/RpLibrary.cc
- Timestamp:
- Mar 25, 2008, 12:19:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpLibrary.cc
r872 r962 1750 1750 // library doesn't exist, do nothing; 1751 1751 status.error("invalid library object"); 1752 status.addContext("RpLibrary::put() ");1752 status.addContext("RpLibrary::put() - putString"); 1753 1753 return *this; 1754 1754 } … … 1763 1763 retNode = _find(path,CREATE_PATH); 1764 1764 1765 if (retNode) { 1766 1767 if (append == RPLIB_APPEND) { 1768 if ( (contents = scew_element_contents(retNode)) ) { 1769 tmpVal = std::string(contents); 1770 } 1771 value = tmpVal + value; 1772 } 1773 1774 if (translateFlag == RPLIB_TRANSLATE) { 1775 translatedContents = ERTranslator.encode(value.c_str(),0); 1776 } 1777 else { 1778 translatedContents = value.c_str(); 1779 } 1780 1765 if (retNode == NULL) { 1766 // node not found, set error 1767 status.error("Error while searching for node: node not found"); 1768 status.addContext("RpLibrary::put() - putString"); 1769 return *this; 1770 } 1771 1772 if (translateFlag == RPLIB_TRANSLATE) { 1773 translatedContents = ERTranslator.encode(value.c_str(),0); 1781 1774 if (translatedContents == NULL) { 1782 1775 // entity referene translation failed … … 1786 1779 } 1787 1780 else { 1788 scew_element_set_contents(retNode,translatedContents);1781 value = std::string(translatedContents); 1789 1782 translatedContents = NULL; 1790 1783 } 1791 1784 } 1792 else { 1793 // node not found, set error 1794 if (!status) { 1795 status.error("Error while searching for node: node not found"); 1796 } 1797 } 1785 1786 if (append == RPLIB_APPEND) { 1787 contents = scew_element_contents(retNode); 1788 if (contents != NULL) { 1789 tmpVal = std::string(contents); 1790 value = tmpVal + value; 1791 } 1792 } 1793 1794 scew_element_set_contents(retNode,value.c_str()); 1798 1795 1799 1796 status.addContext("RpLibrary::put() - putString"); … … 2212 2209 std::string hostname = ""; 2213 2210 char *user = NULL; 2214 char *host = NULL;2215 2211 2216 2212 if (this->root) {
Note: See TracChangeset
for help on using the changeset viewer.