LCDproc development and user support list

Text archives Help

[Lcdproc] Error: client name too long in lcdproc

Chronological Thread 
  • From: a.foss AT (Andrew Foss)
  • Subject: [Lcdproc] Error: client name too long in lcdproc
  • Date: Tue Mar 28 00:46:01 2006

Here's a shortfix for longer screen names, unless there's a better way?

Andrew Foss wrote:
any recommendations?

I see 2 solutions;

in the server client_commands.c
client_set_func (Client * c, int argc, char **argv)
int i;
char str[16];

"str" is 16, on my linux kernel the UTSNAME_LENGTH is defined at 65, not sure about other systems or whether there's any standards for limits to hostname lengths.

in the lcdproc client main.c
const char *get_hostname()

get_hostname could be modified to return a max 16 character name.

option 1 seems the simplest, though I know we're trying to to change the server code, getting ready for release...


Markus Dolze wrote:

when trying Andrew Foss' patch with lcdproc I received the following errors (not exact wording):

"huh? client name too long"

followed by several

"you must set a client name"

I traced this back to a change in lcdproc client on 2006/02/18 when the "client_set -name" on server connect was "enhanced" with with clients hostname.

If you look at server/commands/client_command.c the buffer receiving this string is only 16 characters long.

I don't know why that "enhancement" was introduced, so I don't know which of client or server to fix.


LCDproc mailing list
LCDproc AT

diff --exclude='*.wanjet' --exclude='.??*' --exclude=config.h
--exclude='*.orig' --exclude=Makefile --exclude='*.o' --exclude=Doxyfile
--exclude='*.a' --exclude=config.log --exclude=config.status
--exclude='init-*' --exclude=lcdproc -Nuarp commands/client_commands.c
--- commands/client_commands.c 2005-07-18 00:00:47.000000000 -0700
+++ commands.namefix/client_commands.c 2006-03-27 16:36:30.000000000 -0800
@@ -96,7 +96,7 @@ int
client_set_func (Client * c, int argc, char **argv)
int i;
- char str[16];
+ char str[65];

memset(str, '\0', sizeof(str));
if (!c->ack)

Archive powered by MHonArc 2.6.18.

Top of page