<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All, we were having problems with FMs logging tons of messages similar to the following in the core log file:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>2011-02-07 17:58:26 4528 (w)2611397 Invalid command message data: unexpected bw response from client 085DD320 (127.0.0.1) -<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I traced it back to the SendCheckBWResult method encoding a negative value that was generated by converting the double value returned from SendCheckBW to an integer. The value should be a positive number, greater than 0, for FMS to not log the error. There’s probably a better value to pass here but for now this will silence the FMS errors and probably prevent some CDNs from blocking the app. Let me know if ya’ll have any questions, thanks!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Index: rtmp.c<o:p></o:p></p><p class=MsoNormal>===================================================================<o:p></o:p></p><p class=MsoNormal>--- rtmp.c (revision 555)<o:p></o:p></p><p class=MsoNormal>+++ rtmp.c (working copy)<o:p></o:p></p><p class=MsoNormal>@@ -2281,7 +2282,7 @@<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> AMFObject obj;<o:p></o:p></p><p class=MsoNormal> AVal method;<o:p></o:p></p><p class=MsoNormal>- int txn;<o:p></o:p></p><p class=MsoNormal>+ double txn = 0;<o:p></o:p></p><p class=MsoNormal> int ret = 0, nRes;<o:p></o:p></p><p class=MsoNormal> if (body[0] != 0x02) /* make sure it is a string method name we start with */<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal>@@ -2299,7 +2300,7 @@<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> AMF_Dump(&obj);<o:p></o:p></p><p class=MsoNormal> AMFProp_GetString(AMF_GetProp(&obj, NULL, 0), &method);<o:p></o:p></p><p class=MsoNormal>- txn = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));<o:p></o:p></p><p class=MsoNormal>+ txn = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));<o:p></o:p></p><p class=MsoNormal> RTMP_Log(RTMP_LOGDEBUG, "%s, server invoking <%s>", __FUNCTION__, method.av_val);<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> if (AVMATCH(&method, &av__result))<o:p></o:p></p><p class=MsoNormal>@@ -2308,14 +2309,14 @@<o:p></o:p></p><p class=MsoNormal> int i;<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> for (i=0; i<r->m_numCalls; i++) {<o:p></o:p></p><p class=MsoNormal>- if (r->m_methodCalls[i].num == txn) {<o:p></o:p></p><p class=MsoNormal>+ if (r->m_methodCalls[i].num == (int)txn) {<o:p></o:p></p><p class=MsoNormal> methodInvoked = r->m_methodCalls[i].name;<o:p></o:p></p><p class=MsoNormal> AV_erase(r->m_methodCalls, &r->m_numCalls, i, FALSE);<o:p></o:p></p><p class=MsoNormal> break;<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal> if (!methodInvoked.av_val) {<o:p></o:p></p><p class=MsoNormal>- RTMP_Log(RTMP_LOGDEBUG, "%s, received result id %d without matching request",<o:p></o:p></p><p class=MsoNormal>+ RTMP_Log(RTMP_LOGDEBUG, "%s, received result id <%0.2f> without matching request",<o:p></o:p></p><p class=MsoNormal> __FUNCTION__, txn);<o:p></o:p></p><p class=MsoNormal> goto leave;<o:p></o:p></p><p class=MsoNormal> } <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sincerely,<o:p></o:p></p><p class=MsoNormal>Chris Larsen<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>