Bug#170871: (no subject)

2003-01-11 Thread Alex de Landgraaf
Quoting Colin Watson <[EMAIL PROTECTED]>:

> QA had nothing to do with it; I didn't touch this part of the code when
> I did the recent QA upload of xmms-nas, I just didn't notice that it was
> there.

Hmm, then it might have been an earlier update. Sorry for falsely accusing QA!

> > added else to otherwise just use the string inserted :)
> 
> > --- xmms-nas-0.2/nasconf.c  2002-12-03 23:12:38.0 +
> > +++ xmms-new/nasconf.c  2002-12-03 23:06:00.0 +
> > @@ -43,6 +43,9 @@
> >  
> > if (getenv("AUDIOHOST") &&
> g_strcasecmp(nas_cfg.server,getenv("AUDIOHOST")))
> > xmms_cfg_write_string(cfgfile, "NAS", "server", nas_cfg.server);
> > +   else if (g_strcasecmp(nas_cfg.server,"") != 0)
> > +   xmms_cfg_write_string(cfgfile, "NAS", "server", nas_cfg.server);
> > +
> > xmms_cfg_write_int(cfgfile, "NAS", "buffer_size", nas_cfg.bufsize);
> > xmms_cfg_write_file(cfgfile, filename);
> > xmms_cfg_free(cfgfile);
> 
> Thanks for the patch. Wouldn't it be better to say something more like:
> 
>   if (g_strcasecmp(nas_cfg.server,
>getenv("AUDIOHOST") ? getenv("AUDIOHOST") : ""))
> 
> (or a variant with less duplication)? That seems to be closer to the
> intent of the original code, i.e. don't save nas_cfg.server if it's
> equal to the value of $AUDIOHOST.

Sure, it was just a (very bad) example of how to fix it. Be my guest to
implement a more sane patch :)

Cheers, and thanks for looking into the bug,

Alex de Landgraaf


 /'-'\
( o o )
oOO0--(_)--0OOo
Wouter Alexander de Landgraaf  
Student AI & CS VU Amsterdam 
Phone: 06-16844084
GPG: http://am.xs4all.nl/key_alex.asc
IRC: #debian/OPN, irc.xchat.org  
 .oooO   
 (   )   Oooo. 
--\ ((  )--
   \_)) / 
 (_/  






Bug#170871: (no subject)

2002-12-03 Thread Alex de Landgraaf
tags 170871 +patch
stop

a patch for the recently uploaded xmms-nas package bug, hostname wasnt being 
saved.
I guess QA wanted to use env settings to handle this? added else to otherwise 
just
use the string inserted :)
 
for the impatient the deb can be d/led from http:/am.xs4all.nl/debian

-- 
GPG: 1024B/94C5FD4B Wouter Alexander de Landgraaf 
(Alextreme :: am.xs4all.nl) 
http://am.xs4all.nl/key_alex.asc
ICQ: 31162909
IRC: #debian/OPN, irc.xchat.org





xmms-nas_nasconf_c.patch
Description: Binary data