[MPlayer-cvslog] r22959 - trunk/stream/realrtsp/real.c
rtogni
subversion at mplayerhq.hu
Mon Apr 9 22:06:46 CEST 2007
Author: rtogni
Date: Mon Apr 9 22:06:45 2007
New Revision: 22959
Modified:
trunk/stream/realrtsp/real.c
Log:
Size of response is known, no need to calculate it
Modified: trunk/stream/realrtsp/real.c
==============================================================================
--- trunk/stream/realrtsp/real.c (original)
+++ trunk/stream/realrtsp/real.c Mon Apr 9 22:06:45 2007
@@ -105,7 +105,7 @@ static void calc_response_string (char *
static void real_calc_response_and_checksum (char *response, char *chksum, char *challenge) {
- int ch_len, resp_len;
+ int ch_len;
int i;
char *ptr;
char buf[128];
@@ -145,11 +145,10 @@ static void real_calc_response_and_check
calc_response_string (response, buf);
/* add tail */
- resp_len = strlen (response);
- strcpy (&response[resp_len], "01d0a8e3");
+ strcpy (&response[32], "01d0a8e3");
/* calculate checksum */
- for (i=0; i<resp_len/4; i++)
+ for (i=0; i<8; i++)
chksum[i] = response[i*4];
}
More information about the MPlayer-cvslog
mailing list