summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2003-12-11 01:15:53 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2003-12-11 01:15:53 +0000
commit609317fd7a7ae4923101066c7dfd1a7d22d1b8b2 (patch)
tree4163e9c1e8bbf6369f64f23e402819f7dd08e97d
parent165eb16d8d0545d4ca431ae1d570fa2b79861242 (diff)
downloadxine-lib-609317fd7a7ae4923101066c7dfd1a7d22d1b8b2.tar.gz
xine-lib-609317fd7a7ae4923101066c7dfd1a7d22d1b8b2.tar.bz2
Use SDP naming scheme.
Fix strange len8 computation. CVS patchset: 5890 CVS date: 2003/12/11 01:15:53
-rw-r--r--src/input/mms.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/input/mms.c b/src/input/mms.c
index b6bd1ef5b..7c5afc13f 100644
--- a/src/input/mms.c
+++ b/src/input/mms.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: mms.c,v 1.39 2003/12/09 00:02:29 f1rmb Exp $
+ * $Id: mms.c,v 1.40 2003/12/11 01:15:53 tmattern Exp $
*
* MMS over TCP protocol
* based on work from major mms
@@ -167,28 +167,31 @@ static int get_guid (unsigned char *buffer, int offset) {
return GUID_ERROR;
}
-static int send_command (mms_t *this, int command, uint32_t switches,
- uint32_t extra, int length) {
- int len8;
- off_t n;
+static int send_command (mms_t *this, int command,
+ uint32_t prefix1, uint32_t prefix2,
+ int length) {
+ int len8;
+ off_t n;
- len8 = (length + (length % 8)) / 8;
+ len8 = (length + 7) / 8;
this->scmd_len = 0;
- put_32 (this, 0x00000001); /* start sequence */
- put_32 (this, 0xB00BFACE); /* #-)) */
+ put_32 (this, 0x00000001); /* start sequence */
+ put_32 (this, 0xB00BFACE); /* #-)) */
put_32 (this, length + 32);
- put_32 (this, 0x20534d4d); /* protocol type "MMS " */
+ put_32 (this, 0x20534d4d); /* protocol type "MMS " */
put_32 (this, len8 + 4);
put_32 (this, this->seq_num);
this->seq_num++;
- put_32 (this, 0x0); /* unknown */
+ put_32 (this, 0x0); /* timestamp */
put_32 (this, 0x0);
put_32 (this, len8+2);
put_32 (this, 0x00030000 | command); /* dir | command */
- put_32 (this, switches);
- put_32 (this, extra);
+ /* end of the 40 byte command header */
+
+ put_32 (this, prefix1);
+ put_32 (this, prefix2);
/* memcpy (&cmd->buf[48], data, length); */