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.
--\ (( )--
\_)) /
(_/