[23151] in Source-Commits
/svn/athena r22812 - trunk/athena/lib/zephyr/zwgc
daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Thu Apr 3 13:27:12 2008
Date: Thu, 3 Apr 2008 13:26:55 -0400 (EDT)
From: ghudson@MIT.EDU
Message-Id: <200804031726.NAA06586@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: ghudson
Date: 2008-04-03 13:26:54 -0400 (Thu, 03 Apr 2008)
New Revision: 22812
Modified:
trunk/athena/lib/zephyr/zwgc/notice.c
Log:
From Karl Ramm: In zwgc, convert the port number to host byte order
when setting the "port" zwgc variable.
Modified: trunk/athena/lib/zephyr/zwgc/notice.c
===================================================================
--- trunk/athena/lib/zephyr/zwgc/notice.c 2008-04-03 17:24:44 UTC (rev 22811)
+++ trunk/athena/lib/zephyr/zwgc/notice.c 2008-04-03 17:26:54 UTC (rev 22812)
@@ -269,7 +269,7 @@
var_set_variable("recipient",
(notice->z_recipient[0] ? notice->z_recipient : "*"));
var_set_variable("fullsender", notice->z_sender);
- var_set_variable_to_number("port", (int)notice->z_port);
+ var_set_variable_to_number("port", (int)ntohs(notice->z_port));
var_set_variable_then_free_value("kind", z_kind_to_ascii(notice->z_kind));
var_set_variable_then_free_value("auth", z_auth_to_ascii(notice->z_auth));