[rtmpdump] [PATCH] FMS Logs: unexpected bw response from client

Chris Larsen clarsen at euphoriaaudio.com
Tue Feb 8 00:19:14 CET 2011

Hi All, we were having problems with FMs logging tons of messages similar to
the following in the core log file:


2011-02-07          17:58:26               4528       (w)2611397
Invalid command message data: unexpected bw response from client 085DD320
(          -


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!


Index: rtmp.c


--- rtmp.c             (revision 555)

+++ rtmp.c          (working copy)

@@ -2281,7 +2282,7 @@


   AMFObject obj;

   AVal method;

-  int txn;

+  double txn = 0;

   int ret = 0, nRes;

   if (body[0] != 0x02)                      /* make sure it is a string
method name we start with */


@@ -2299,7 +2300,7 @@


   AMFProp_GetString(AMF_GetProp(&obj, NULL, 0), &method);

-  txn = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));

+  txn = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));

   RTMP_Log(RTMP_LOGDEBUG, "%s, server invoking <%s>", __FUNCTION__,

   if (AVMATCH(&method, &av__result))

@@ -2308,14 +2309,14 @@

       int i;

       for (i=0; i<r->m_numCalls; i++) {

-              if (r->m_methodCalls[i].num == txn) {

+             if (r->m_methodCalls[i].num == (int)txn) {

                 methodInvoked = r->m_methodCalls[i].name;

                 AV_erase(r->m_methodCalls, &r->m_numCalls, i, FALSE);




       if (!methodInvoked.av_val) {

-        RTMP_Log(RTMP_LOGDEBUG, "%s, received result id %d without matching

+        RTMP_Log(RTMP_LOGDEBUG, "%s, received result id <%0.2f> without
matching request",

                 __FUNCTION__, txn);

               goto leave;




Chris Larsen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20110207/3df7b8f5/attachment.htm>

More information about the rtmpdump mailing list