diff options
author | McCabe Maxsted | 2009-09-04 09:31:06 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-04 09:31:06 -0700 |
commit | 7529497350ce7205d516ed351a054d2b0a0f4f4f (patch) | |
tree | d1467365d5fb4c7fcf2c8b9c9b6b578cd49f6da4 /linden/indra | |
parent | Fixed CMake not finding GLib on windows (diff) | |
parent | Backported 1.23 fix for animation joint assertion crash. (diff) | |
download | meta-impy-7529497350ce7205d516ed351a054d2b0a0f4f4f.zip meta-impy-7529497350ce7205d516ed351a054d2b0a0f4f4f.tar.gz meta-impy-7529497350ce7205d516ed351a054d2b0a0f4f4f.tar.bz2 meta-impy-7529497350ce7205d516ed351a054d2b0a0f4f4f.tar.xz |
Merged in jacek/next
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/lib/python/indra/base/lluuid.py | 5 | ||||
-rw-r--r-- | linden/indra/lib/python/indra/ipc/llmessage.py | 6 | ||||
-rw-r--r-- | linden/indra/llcharacter/llkeyframemotion.cpp | 37 |
3 files changed, 40 insertions, 8 deletions
diff --git a/linden/indra/lib/python/indra/base/lluuid.py b/linden/indra/lib/python/indra/base/lluuid.py index aceea29..40ce818 100644 --- a/linden/indra/lib/python/indra/base/lluuid.py +++ b/linden/indra/lib/python/indra/base/lluuid.py | |||
@@ -26,7 +26,8 @@ THE SOFTWARE. | |||
26 | $/LicenseInfo$ | 26 | $/LicenseInfo$ |
27 | """ | 27 | """ |
28 | 28 | ||
29 | import md5, random, socket, string, time, re | 29 | import random, socket, string, time, re |
30 | from hashlib import md5 | ||
30 | import uuid | 31 | import uuid |
31 | 32 | ||
32 | def _int2binstr(i,l): | 33 | def _int2binstr(i,l): |
@@ -196,7 +197,7 @@ class UUID(object): | |||
196 | from c++ implementation for portability reasons. | 197 | from c++ implementation for portability reasons. |
197 | Returns self. | 198 | Returns self. |
198 | """ | 199 | """ |
199 | m = md5.new() | 200 | m = md5() |
200 | m.update(uuid.uuid1().bytes) | 201 | m.update(uuid.uuid1().bytes) |
201 | self._bits = m.digest() | 202 | self._bits = m.digest() |
202 | return self | 203 | return self |
diff --git a/linden/indra/lib/python/indra/ipc/llmessage.py b/linden/indra/lib/python/indra/ipc/llmessage.py index 6161bad..91fb36b 100644 --- a/linden/indra/lib/python/indra/ipc/llmessage.py +++ b/linden/indra/lib/python/indra/ipc/llmessage.py | |||
@@ -26,8 +26,6 @@ THE SOFTWARE. | |||
26 | $/LicenseInfo$ | 26 | $/LicenseInfo$ |
27 | """ | 27 | """ |
28 | 28 | ||
29 | from sets import Set, ImmutableSet | ||
30 | |||
31 | from compatibility import Incompatible, Older, Newer, Same | 29 | from compatibility import Incompatible, Older, Newer, Same |
32 | from tokenstream import TokenStream | 30 | from tokenstream import TokenStream |
33 | 31 | ||
@@ -44,8 +42,8 @@ class Template: | |||
44 | 42 | ||
45 | def compatibleWithBase(self, base): | 43 | def compatibleWithBase(self, base): |
46 | messagenames = ( | 44 | messagenames = ( |
47 | ImmutableSet(self.messages.keys()) | 45 | frozenset(self.messages.keys()) |
48 | | ImmutableSet(base.messages.keys()) | 46 | | frozenset(base.messages.keys()) |
49 | ) | 47 | ) |
50 | 48 | ||
51 | compatibility = Same() | 49 | compatibility = Same() |
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp index 212020b..4b138b1 100644 --- a/linden/indra/llcharacter/llkeyframemotion.cpp +++ b/linden/indra/llcharacter/llkeyframemotion.cpp | |||
@@ -1560,6 +1560,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1560 | } | 1560 | } |
1561 | constraintp->mChainLength = (S32) byte; | 1561 | constraintp->mChainLength = (S32) byte; |
1562 | 1562 | ||
1563 | if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions()) | ||
1564 | { | ||
1565 | llwarns << "invalid constraint chain length" << llendl; | ||
1566 | delete constraintp; | ||
1567 | return FALSE; | ||
1568 | } | ||
1569 | |||
1563 | if (!dp.unpackU8(byte, "constraint_type")) | 1570 | if (!dp.unpackU8(byte, "constraint_type")) |
1564 | { | 1571 | { |
1565 | llwarns << "can't read constraint type" << llendl; | 1572 | llwarns << "can't read constraint type" << llendl; |
@@ -1587,7 +1594,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1587 | delete constraintp; | 1594 | delete constraintp; |
1588 | return FALSE; | 1595 | return FALSE; |
1589 | } | 1596 | } |
1590 | 1597 | ||
1598 | if( !(constraintp->mSourceConstraintOffset.isFinite()) ) | ||
1599 | { | ||
1600 | llwarns << "non-finite constraint source offset" << llendl; | ||
1601 | delete constraintp; | ||
1602 | return FALSE; | ||
1603 | } | ||
1604 | |||
1591 | if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) | 1605 | if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) |
1592 | { | 1606 | { |
1593 | llwarns << "can't read target volume name" << llendl; | 1607 | llwarns << "can't read target volume name" << llendl; |
@@ -1615,6 +1629,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1615 | return FALSE; | 1629 | return FALSE; |
1616 | } | 1630 | } |
1617 | 1631 | ||
1632 | if( !(constraintp->mTargetConstraintOffset.isFinite()) ) | ||
1633 | { | ||
1634 | llwarns << "non-finite constraint target offset" << llendl; | ||
1635 | delete constraintp; | ||
1636 | return FALSE; | ||
1637 | } | ||
1638 | |||
1618 | if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) | 1639 | if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) |
1619 | { | 1640 | { |
1620 | llwarns << "can't read constraint target direction" << llendl; | 1641 | llwarns << "can't read constraint target direction" << llendl; |
@@ -1622,6 +1643,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1622 | return FALSE; | 1643 | return FALSE; |
1623 | } | 1644 | } |
1624 | 1645 | ||
1646 | if( !(constraintp->mTargetConstraintDir.isFinite()) ) | ||
1647 | { | ||
1648 | llwarns << "non-finite constraint target direction" << llendl; | ||
1649 | delete constraintp; | ||
1650 | return FALSE; | ||
1651 | } | ||
1652 | |||
1625 | if (!constraintp->mTargetConstraintDir.isExactlyZero()) | 1653 | if (!constraintp->mTargetConstraintDir.isExactlyZero()) |
1626 | { | 1654 | { |
1627 | constraintp->mUseTargetOffset = TRUE; | 1655 | constraintp->mUseTargetOffset = TRUE; |
@@ -1685,8 +1713,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1685 | break; | 1713 | break; |
1686 | } | 1714 | } |
1687 | } | 1715 | } |
1716 | if (constraintp->mJointStateIndices[i] < 0 ) | ||
1717 | { | ||
1718 | llwarns << "No joint index for constraint " << i << llendl; | ||
1719 | delete constraintp; | ||
1720 | return FALSE; | ||
1721 | } | ||
1688 | } | 1722 | } |
1689 | |||
1690 | } | 1723 | } |
1691 | } | 1724 | } |
1692 | 1725 | ||