[xiph-commits] r7330 - icecast/branches/kh/icecast/src
karl at dactyl.lonelymoon.com
karl
Sun Jul 25 10:00:38 PDT 2004
Author: karl
Date: Sun Jul 25 10:00:38 2004
New Revision: 7330
Modified:
icecast/branches/kh/icecast/src/slave.c
Log:
a fix and a small cleanup
Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c 2004-07-25 16:38:00 UTC (rev 7329)
+++ icecast/branches/kh/icecast/src/slave.c 2004-07-25 17:00:38 UTC (rev 7330)
@@ -403,7 +403,7 @@
int on_demand;
if (config->master_username)
- username = strdup (config->master_password);
+ username = strdup (config->master_username);
else
username = strdup ("relay");
if (config->master_password)
@@ -427,11 +427,9 @@
break;
}
- len = strlen(username) + strlen(password) + 1;
- authheader = malloc(len+1);
- strcpy(authheader, username);
- strcat(authheader, ":");
- strcat(authheader, password);
+ len = strlen(username) + strlen(password) + 2;
+ authheader = malloc(len);
+ snprintf (authheader, len, "%s:%s", username, password);
data = util_base64_encode(authheader);
sock_write (mastersock,
"GET /admin/streamlist.txt HTTP/1.0\r\n"
More information about the commits
mailing list