Re: [gnome-network]GnetworkHttpServer and GNOME Personal Web Server

On Mon, 2003-09-08 at 23:26 +0200, ÁlvaroPeña wrote:
> Hi all,
>         I have developed a http library (into the new libgnetwork), using the
> cherokee http server library, I have modified the and check
> for libcherokee, if don't exists don't tray to compile it.
>         Basically is a object called GnetworkHttpServer, have a big TODO list,
> but just work. So, I have developed an example for use this server, is a
> Personal Web Server, use gconf for storage the configuration, is under
> apps/gnome-pws, you can modified from gconf-editor, the pws show a icon
> in the system tray, with the ok stock icon when the server is on, and
> cancel icon when the server is off (yes, it's only an example ;-)
>         I hope you like it, you can download it from:
>         Have one patch file, for configure and makefiles and 2 directories, one
> with libgnetwork and other with the pws.
it looks great, although some comments:

* use GNetwork* for types, not Gnetwork, which looks really ugly.

* code like:
	server->priv = g_new0 (GnetworkHttpServerPrivate, 1);
        server->priv->cserver = NULL;
is redundant, since g_new0 already sets the structure's contents to 0.

* in the _finalize method, the best thing is to:
	if (priv) {
		/* free everything */
		priv = NULL;
Also, it seems you forgot to remove the idle call in _finalize. If you
don't do so, when the HttpServer object is destroyed, the idle callback
will continue being called.

* use GNOME coding guidelines which include using:
	if (whatever == v)
instead of
	if ( whatever == v )
That is, remove the extra spaces after and before the parens.
Also, dont use:
	function_call(param1, param...);
	function_call (param1, param...);
That is, leave a space before the opening paren.

* stopping the server by just left clicking on the icon seems a bit
weird to me. So, instead of directly stopping, I'd rather prefer having
a dialog pop up to ask the user what to do.

>         If you like it I can submmit it. And then start to add more functions
> and objects to libgnetwork ;-)
yes, please fix the above stuff and commit.

And well, which objects are you going to add?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]