# HG changeset patch # User rbultje # Date 1279638066 0 # Node ID a1500faf3a7e807a7b70f78d3ccdaa746da04bd2 # Parent fb720b9d8ee19f043e68f88f780b611ccce08733 Check the status code of each server responses, and fail if it indicates a problem. Patch by Zhentan Feng . diff -r fb720b9d8ee1 -r a1500faf3a7e mmst.c --- a/mmst.c Tue Jul 20 14:59:23 2010 +0000 +++ b/mmst.c Tue Jul 20 15:01:06 2010 +0000 @@ -260,6 +260,7 @@ read_result= url_read_complete(mms->mms_hd, mms->in_buffer+8, 4); if(read_result == 4) { int length_remaining= AV_RL32(mms->in_buffer+8) + 4; + int hr; dprintf(NULL, "Length remaining is %d\n", length_remaining); // read the rest of the packet. @@ -277,6 +278,11 @@ dprintf(NULL, "read for packet type failed%d!\n", read_result); return -1; } + hr = AV_RL32(mms->in_buffer + 40); + if (hr) { + dprintf(NULL, "The server side send back error code:0x%x\n", hr); + return -1; + } } else { dprintf(NULL, "read for length remaining failed%d!\n", read_result); return -1;