Re: [Musicpd-dev-team] New command line parser
25.11.2013 23:19, Matthias Petschick пишет: Hello, this patch (db238cc23f3bb5c9768d30ae24b99e67a5795203) introduces a segfault upon client connect when mpd is compiled with libwrap enabled. The reason is the removal of g_option_context_parse, which calls g_set_prgname as a side-effect. Some libwrap specific code in ClientNew.cxx and output/HttpdOutputPlugin.cxx depends on the return value of g_get_prgname not being NULL, in particular the invocation of request_init segfaults if the parameter to RQ_DAEMON is NULL. If g_set_prgname never gets called, g_get_prgname always returns NULL. A obvious means of fixing this would be to pass a copy of argv[0] to request_init. Furthermore, it might be a good idea to check for side-effects when removing glib dependencies in the future, not to mention checking return values for NULL before passing them on. Cheers, Matthias Hello Matthias, thanks for the feedback. Looks like Max already fixed one of the affected classes. I'll provide a patch for the second. -- Denis -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] New command line parser
On 2013/11/24 12:34, Denis Krjuchkov de...@crazydev.net wrote: this time I'm reworking command line parsing to avoid using g_option stuff. I was wondering whether we should use boost for that. Now you implemented a new parser. Why that? -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] New command line parser
24.11.2013 18:38, Max Kellermann пишет: I was wondering whether we should use boost for that. Now you implemented a new parser. Why that? Why not? Probably for the complex cases it's better to use a library* but MPD currently uses very simple flag options that are easily parsed without any library. If you intention was to add many other command line options in the future this probably is not the way to go. On the other side if the goal is to remove GLib this looks fairly suitable. * However I personally dislike boost due to its hardcore C++ style with lots of templates etc. -- Denis -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] New command line parser
On 2013/11/24 14:08, Denis Krjuchkov de...@crazydev.net wrote: 24.11.2013 18:38, Max Kellermann ??: I was wondering whether we should use boost for that. Now you implemented a new parser. Why that? Why not? Probably for the complex cases it's better to use a library* but MPD currently uses very simple flag options that are easily parsed without any library. If you intention was to add many other command line options in the future this probably is not the way to go. On the other side if the goal is to remove GLib this looks fairly suitable. Sound fair. I've merged it, thanks. -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team