Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int
- HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
- {
- AMFObject obj;
- AVal method;
- int txn;
- int ret = 0, nRes;
- if (body[0] != 0x02) /* make sure it is a string method name we start with */
- {
- RTMP_Log(RTMP_LOGWARNING, "%s, Sanity failed. no string method in invoke packet",
- __FUNCTION__);
- return 0;
- }
- nRes = AMF_Decode(&obj, body, nBodySize, FALSE);
- if (nRes < 0)
- {
- RTMP_Log(RTMP_LOGERROR, "%s, error decoding invoke packet", __FUNCTION__);
- return 0;
- }
- AMF_Dump(&obj);
- AMFProp_GetString(AMF_GetProp(&obj, NULL, 0), &method);
- txn = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));
- RTMP_Log(RTMP_LOGDEBUG, "%s, server invoking <%s>", __FUNCTION__, method.av_val);
Add Comment
Please, Sign In to add comment