Changeset 343 for trunk/src/cppbase/bs_config.cpp
- Timestamp:
- Dec 4, 2006, 12:57:42 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cppbase/bs_config.cpp
r328 r343 69 69 70 70 /* 71 * This file Copyright (C) 1999-200 1Ulrich Mller.71 * This file Copyright (C) 1999-2006 Ulrich Mller. 72 72 * This program is free software; you can redistribute it and/or modify 73 73 * it under the terms of the GNU General Public License as published by … … 1426 1426 * 1427 1427 + CREATEOBJECT="[REPLACE] classname|title|location[|config]]" 1428 + CREATEOBJECT="[FAIL] classname|title|location[|config]]" 1428 1429 * 1429 1430 * Throws: … … 1433 1434 *@@changed V0.9.15 (2001-08-26) [umoeller]: added WPOEXCPT_INVALIDLOCATION checks 1434 1435 *@@changed V0.9.19 (2002-04-14) [umoeller]: REPLACE was never detected, fixed 1436 *@@changed V1.0.14 (2006-12-03) [pr]: added FAIL mode @@fixes 893 1435 1437 */ 1436 1438 … … 1445 1447 throw BSConfigExcpt(WPOEXCPT_NOCLASS, ustrCreateObject); 1446 1448 1447 // if (!strcmp(pBegin, "REPLACE ")) BUZZZZ WRONG V0.9.19 (2002-04-14) [umoeller]1448 1449 if (!memcmp(pBegin, "REPLACE ", 8)) 1449 1450 { 1450 // added V0.9.3 (2000-04-08) [umoeller] 1451 _fReplace = TRUE; 1452 pBegin += 7; 1451 _ulFlags = CO_REPLACEIFEXISTS; // V1.0.14 (2006-12-03) [pr] 1452 pBegin += 8; 1453 1453 while (*pBegin == ' ') 1454 1454 pBegin++; 1455 1455 } 1456 1456 else 1457 _fReplace = FALSE; 1457 if (!memcmp(pBegin, "FAIL ", 5)) // V1.0.14 (2006-12-03) [pr] 1458 { 1459 _ulFlags = CO_FAILIFEXISTS; 1460 pBegin += 5; 1461 while (*pBegin == ' ') 1462 pBegin++; 1463 } 1464 else 1465 _ulFlags = CO_UPDATEIFEXISTS; // V1.0.14 (2006-12-03) [pr] 1458 1466 1459 1467 PSZ pEnd; … … 1544 1552 * 1545 1553 *@@changed V0.9.18 (2002-03-08) [umoeller]: added codec 1554 *@@changed V1.0.14 (2006-12-03) [pr]: added FAIL mode @@fixes 893 1546 1555 */ 1547 1556 … … 1575 1584 pcszSetupString, 1576 1585 pcszLocation, 1577 (_fReplace) 1578 ? CO_REPLACEIFEXISTS 1579 : CO_UPDATEIFEXISTS))) 1580 { 1586 _ulFlags))) 1587 { 1588 if (_ulFlags == CO_FAILIFEXISTS) // V1.0.14 (2006-12-03) [pr] 1589 { 1590 if (pLogFile) 1591 pLogFile->Write("WPS object already exists \"%s\", class \"%s\", location \"%s\", setup \"%s\"", 1592 pcszTitle, 1593 pcszClassName, 1594 pcszLocation, 1595 pcszSetupString); 1596 } 1597 else 1598 { 1599 if (pLogFile) 1600 pLogFile->Write("Error creating WPS object \"%s\", class \"%s\", location \"%s\", setup \"%s\"", 1601 pcszTitle, 1602 pcszClassName, 1603 pcszLocation, 1604 pcszSetupString); 1605 1606 throw BSConfigExcpt(WPOEXCPT_CREATE, _ustrTitle); 1607 } 1608 } 1609 else 1610 { 1611 // V1.0.5 (2005-02-17) [pr] 1612 // We now save the object synchronously to prevent objects getting lost if we 1613 // restart the WPS imminently due to a class registration for example. @@fixes 634. 1614 WinSaveObject (_hobj, FALSE); 1581 1615 if (pLogFile) 1582 pLogFile->Write("Error creating WPS object \"%s\", class \"%s\", location \"%s\", setup \"%s\"", 1583 pcszTitle, 1584 pcszClassName, 1585 pcszLocation, 1586 pcszSetupString); 1587 1588 throw BSConfigExcpt(WPOEXCPT_CREATE, _ustrTitle); 1589 } 1590 1591 // V1.0.5 (2005-02-17) [pr] 1592 // We now save the object synchronously to prevent objects getting lost if we 1593 // restart the WPS imminently due to a class registration for example. @@fixes 634. 1594 WinSaveObject (_hobj, FALSE); 1595 if (pLogFile) 1596 { 1597 pLogFile->Write("Created WPS object \"%s\", class \"%s\", location \"%s\", setup \"%s\"", 1598 pcszTitle, 1599 pcszClassName, 1600 pcszLocation, 1601 pcszSetupString); 1602 pLogFile->Write("HOBJECT is 0x%lX", _hobj); 1616 { 1617 pLogFile->Write("Created WPS object \"%s\", class \"%s\", location \"%s\", setup \"%s\"", 1618 pcszTitle, 1619 pcszClassName, 1620 pcszLocation, 1621 pcszSetupString); 1622 pLogFile->Write("HOBJECT is 0x%lX", _hobj); 1623 } 1603 1624 } 1604 1625
Note:
See TracChangeset
for help on using the changeset viewer.