Bug#306422: marked as done (gtetrinet: [patch] fixes network message latency)

Debian Bug Tracking System owner@bugs.debian.org
Mon, 02 May 2005 15:33:20 -0700


Your message dated Mon, 02 May 2005 18:02:04 -0400
with message-id <E1DSizM-0004e2-00@newraff.debian.org>
and subject line Bug#306422: fixed in gtetrinet 0.7.9-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Apr 2005 12:44:57 +0000
>From debbug2005@julien.plissonneau.duquene.net Tue Apr 26 05:44:57 2005
Return-path: <debbug2005@julien.plissonneau.duquene.net>
Received: from ferbos.duquene.net (removethis.junk.org) [80.65.226.49] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DQPQu-0005Wt-00; Tue, 26 Apr 2005 05:44:57 -0700
Received: by removethis.junk.org (Postfix, from userid 1001)
	id 9B42B5B778; Tue, 26 Apr 2005 14:44:54 +0200 (CEST)
Date: Tue, 26 Apr 2005 14:44:54 +0200
From: Julien Plissonneau Duquene <debbug2005@julien.plissonneau.duquene.net>
To: submit@bugs.debian.org
Subject: gtetrinet: [patch] fixes network message latency
Message-ID: <20050426124454.GA3176@removethis.junk.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.3.28i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.8 required=4.0 tests=BAYES_00,FROM_ENDS_IN_NUMS,
	HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 


--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Package: gtetrinet
Version: 0.7.8-1
X-Debbugs-CC: jordi@sindominio.net, bocata@panete.net
Severity: normal
Tags: patch

Hello,

Attached is a small patch that fixes network message latency with
gtetrinet. Actually the network channel is unbuffered and the lowest
message sending function uses two writes to push every message to the
network, which result in two TCP packets being sent for every message.
The handicap can clearly be seen at the start of games (typically your
opponent has already dropped 1 or 2 blocks when your first one becomes
available).

With this patch gtetrinet's latency matches that of other clients.

Regards,

-- 
Julien Plissonneau Duqučne


--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

--- client.c.orig	2005-04-26 12:50:43.000000000 +0200
+++ client.c	2005-04-26 12:56:15.000000000 +0200
@@ -431,12 +431,14 @@
 
 int client_sendmsg (char *str)
 {
-    char c = 0xFF;
+    gchar *buf;
     GError *error = NULL;
     
-    g_io_channel_write_chars (io_channel, str, -1, NULL, &error);
-    g_io_channel_write_chars (io_channel, &c, 1, NULL, &error);
+    buf = g_strdup(str);
+    buf[strlen(str)] = 0xFF;
+    g_io_channel_write_chars (io_channel, buf, strlen(str)+1, NULL, &error);
     g_io_channel_flush (io_channel, &error);
+    g_free(buf);
 
 #ifdef DEBUG
     printf ("> %s\n", str);

--TB36FDmn/VVEgNH/--

---------------------------------------
Received: (at 306422-close) by bugs.debian.org; 2 May 2005 22:16:57 +0000
>From katie@ftp-master.debian.org Mon May 02 15:16:57 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DSjDk-0005iW-00; Mon, 02 May 2005 15:16:57 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DSizM-0004e2-00; Mon, 02 May 2005 18:02:04 -0400
From: Jordi Mallach <jordi@debian.org>
To: 306422-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#306422: fixed in gtetrinet 0.7.9-1
Message-Id: <E1DSizM-0004e2-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Mon, 02 May 2005 18:02:04 -0400
Delivered-To: 306422-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 3

Source: gtetrinet
Source-Version: 0.7.9-1

We believe that the bug you reported is fixed in the latest version of
gtetrinet, which is due to be installed in the Debian FTP archive:

gtetrinet_0.7.9-1.diff.gz
  to pool/main/g/gtetrinet/gtetrinet_0.7.9-1.diff.gz
gtetrinet_0.7.9-1.dsc
  to pool/main/g/gtetrinet/gtetrinet_0.7.9-1.dsc
gtetrinet_0.7.9-1_i386.deb
  to pool/main/g/gtetrinet/gtetrinet_0.7.9-1_i386.deb
gtetrinet_0.7.9.orig.tar.gz
  to pool/main/g/gtetrinet/gtetrinet_0.7.9.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 306422@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jordi Mallach <jordi@debian.org> (supplier of updated gtetrinet package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 29 Apr 2005 19:10:31 +1000
Source: gtetrinet
Binary: gtetrinet
Architecture: source i386
Version: 0.7.9-1
Distribution: unstable
Urgency: low
Maintainer: Jordi Mallach <jordi@debian.org>
Changed-By: Jordi Mallach <jordi@debian.org>
Description: 
 gtetrinet  - multiplayer tetris-like game
Closes: 204638 304713 306422
Changes: 
 gtetrinet (0.7.9-1) unstable; urgency=low
 .
   * The "DownUnder" release.
   * New upstream release.
     - fixes display of non-ASCII characters on UTF-8 locales
       (closes: #204638).
     - should not segfault on servers with weird /list output
       (closes: #304713).
     - network performance fixes (closes: #306422).
   * debian/control.in: build-depend on libgtk2.0-dev (>= 2.6).
Files: 
 a37c7e0b09933663cb06e1649b9498d8 1532 gnome optional gtetrinet_0.7.9-1.dsc
 39fd47efac9727e093ad6923da5c305b 604714 gnome optional gtetrinet_0.7.9.orig.tar.gz
 4ffb589826e0b5c8511f90f9f60ad33c 6015 gnome optional gtetrinet_0.7.9-1.diff.gz
 23427324d38570311a842d5ad0274d4b 313692 gnome optional gtetrinet_0.7.9-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCdp6bJYSUupF6Il4RAnn/AKCUGQU0Er5Kc5Sd84o00imcmCrXegCg5ykN
mkyFZZQCBK7tEip1PFJ9sMM=
=W7Vw
-----END PGP SIGNATURE-----