After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593660 - gnet deprecated
gnet deprecated
Status: RESOLVED FIXED
Product: gyrus
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Gyrus Maintainers
Gyrus Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-31 12:17 UTC by Emilio Pozuelo Monfort
Modified: 2010-12-29 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace gnet with GSocketClient from gio (12.48 KB, patch)
2010-12-28 11:14 UTC, Claudio Saavedra
committed Details | Review
Do not expect a endline char in incoming messages (1.60 KB, patch)
2010-12-28 12:26 UTC, Claudio Saavedra
committed Details | Review

Description Emilio Pozuelo Monfort 2009-08-31 12:17:40 UTC
Hi,

According to http://live.gnome.org/GNetLibrary, gnet is deprecated. gyrus
should probably switch to glib and/or libsoup.
Comment 1 Claudio Saavedra 2009-11-13 01:14:04 UTC
The logical step nowadays would be to use GSocket. It is likely that GSocket will have TLS support (bug 588189) soon, so this would be the direction to go to kill two birds with one stone (and have proper SSL support).

In the meantime, a port using GSocket would be appreciated.
Comment 2 Claudio Saavedra 2010-12-28 11:14:17 UTC
Created attachment 177128 [details] [review]
Replace gnet with GSocketClient from gio

Use a GSocketClient instead of the deprecated GNet library for
connection to the servers. This is a very simple migration, without
taking advantages of the asynchronous API of gio yet.
Comment 3 Claudio Saavedra 2010-12-28 11:19:17 UTC
I tested this quickly in a local installation, but I'd appreciate some further testing. Alejandro, can you give it a try with one of your servers?
Comment 4 Claudio Saavedra 2010-12-28 11:23:55 UTC
Needless to say, this breaks the tests but I don't care about that atm since I think they will be gone unless someone really wants to add tls support, and that won't be me.
Comment 5 Claudio Saavedra 2010-12-28 12:26:02 UTC
Created attachment 177135 [details] [review]
Do not expect a endline char in incoming messages

This is stripped out in the gsocket based code. Use just \0 or \r
accordingly.
Comment 6 Alejandro Valdes 2010-12-28 13:57:01 UTC
(In reply to comment #3)
> I tested this quickly in a local installation, but I'd appreciate some further
> testing. Alejandro, can you give it a try with one of your servers?

I tested in two servers without problems:

+ create new mailbox
+ delete mailbox
+ modify ACLs
+ change quota
Comment 7 Claudio Saavedra 2010-12-28 23:59:20 UTC
I pushed those patches (slightly improved) to master. GNet free now.

commit c160962f283b5d46009a970b1dd70750357fdd18
Author: Claudio Saavedra <csaavedra@igalia.com>
Date:   Tue Dec 28 13:46:21 2010 +0200

    Do not expect a endline char in incoming messages
    
    This is stripped out in the gsocket based code. Use just \0 or \r
    accordingly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=593660

commit 790d7e27f8c3c8e3dd214f4235d6b3d8a02c18d4
Author: Claudio Saavedra <csaavedra@igalia.com>
Date:   Tue Dec 28 13:11:56 2010 +0200

    Replace gnet with GSocketClient from gio
    
    Use a GSocketClient instead of the deprecated GNet library for
    connection to the servers. This is a very simple migration, without
    taking advantages of the asynchronous API of gio yet.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=593660