summaryrefslogtreecommitdiffstats
path: root/stream/realrtsp
diff options
context:
space:
mode:
Diffstat (limited to 'stream/realrtsp')
-rw-r--r--stream/realrtsp/real.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index 7cbf8bf337..ca03287a63 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -105,7 +105,7 @@ static void calc_response_string (char *result, char *challenge) {
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_checksum (char *response, char *chksum, char
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];
}