summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-03-24 01:37:41 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-03-24 01:37:41 +0000
commit15b14a243ea8fcce9a9457ffc1f6f95d6202ad8a (patch)
tree0c9f168b490784da16fdb516c093af98b63814cb /src
parentf251ab49a1c158e4731d36b2ab468ea1c0a2f475 (diff)
downloadxine-lib-15b14a243ea8fcce9a9457ffc1f6f95d6202ad8a.tar.gz
xine-lib-15b14a243ea8fcce9a9457ffc1f6f95d6202ad8a.tar.bz2
Add Sergiy Kudryk <linux_ua@yahoo.com> as contributor. Don't send
real name/hostname while cddb negociations, patch from <eperez@dei.inf.uc3m.es>. CVS patchset: 1624 CVS date: 2002/03/24 01:37:41
Diffstat (limited to 'src')
-rw-r--r--src/input/input_cda.c44
1 files changed, 6 insertions, 38 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c
index 8f9ea52ba..b76416e12 100644
--- a/src/input/input_cda.c
+++ b/src/input/input_cda.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: input_cda.c,v 1.17 2002/02/17 17:32:50 guenter Exp $
+ * $Id: input_cda.c,v 1.18 2002/03/24 01:37:41 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -269,36 +269,6 @@ static void _cda_mkdir_recursive_safe(char *path) {
}
/*
- * Return user name.
- */
-static char *_cda_get_username_safe(void) {
- char *un;
- struct passwd *pw;
-
- pw = getpwuid(geteuid());
-
- un = strdup(((pw && pw->pw_name) ? strdup(pw->pw_name) : "unknown"));
-
- return un;
-}
-
-/*
- * Return host name.
- */
-static char *_cda_get_hostname_safe(void) {
- char *hn;
- char buf[2048];
-
- memset(&buf, 0, sizeof(buf));
- if(gethostname(&buf[0], sizeof(buf)) == 0)
- hn = strdup(buf);
- else
- hn = strdup("unknown");
-
- return hn;
-}
-
-/*
* ************* CDDB *********************
*/
@@ -590,7 +560,6 @@ static void _cda_cddb_socket_close(cda_input_plugin_t *this) {
*/
static void _cda_cddb_retrieve(cda_input_plugin_t *this) {
char buffer[2048];
- char *username, *hostname;
int err, i;
if(this == NULL)
@@ -623,9 +592,6 @@ static void _cda_cddb_retrieve(cda_input_plugin_t *this) {
return;
}
- username = _cda_get_username_safe();
- hostname = _cda_get_hostname_safe();
-
memset(&buffer, 0, sizeof(buffer));
/* Get welcome message */
@@ -633,7 +599,11 @@ static void _cda_cddb_retrieve(cda_input_plugin_t *this) {
if((err = _cda_cddb_handle_code(buffer)) >= 0) {
/* send hello */
memset(&buffer, 0, sizeof(buffer));
- sprintf(buffer, "cddb hello %s %s xine %s\n", username, hostname, VERSION);
+ /* We don't send current user/host name to prevent spam.
+ * Software that sends this is considered spyware
+ * that most people don't like.
+ */
+ sprintf(buffer, "cddb hello unknown localhost xine %s\n", VERSION);
if((err = _cda_cddb_send_command(this, buffer)) > 0) {
/* Get answer from hello */
memset(&buffer, 0, sizeof(buffer));
@@ -712,8 +682,6 @@ static void _cda_cddb_retrieve(cda_input_plugin_t *this) {
}
}
_cda_cddb_socket_close(this);
- free(username);
- free(hostname);
}
}