[Openvas-commits] r5585 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Oct 17 13:02:17 CEST 2009
Author: mattm
Date: 2009-10-17 13:02:16 +0200 (Sat, 17 Oct 2009)
New Revision: 5585
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/omp.c
Log:
* src/omp.c (send_to_client): Temporarily add conversion of msg from
iso_8859-1 to utf-8, to catch iso chars originating from the OTP messages.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2009-10-16 22:10:51 UTC (rev 5584)
+++ trunk/openvas-manager/ChangeLog 2009-10-17 11:02:16 UTC (rev 5585)
@@ -1,5 +1,10 @@
2009-10-17 Matthew Mundell <matthew.mundell at intevation.de>
+ * src/omp.c (send_to_client): Temporarily add conversion of msg from
+ iso_8859-1 to utf-8, to catch iso chars originating from the OTP messages.
+
+2009-10-17 Matthew Mundell <matthew.mundell at intevation.de>
+
* src/manage.c (rc_preference): Check whether there is a value to
duplicate after an equal sign.
Modified: trunk/openvas-manager/src/omp.c
===================================================================
--- trunk/openvas-manager/src/omp.c 2009-10-16 22:10:51 UTC (rev 5584)
+++ trunk/openvas-manager/src/omp.c 2009-10-17 11:02:16 UTC (rev 5585)
@@ -430,9 +430,24 @@
strlen (msg));
return TRUE;
}
+
+#if 1
+ /** @todo FIX Temp hack to catch ISO chars sent by scanner. */
+ gsize size_dummy;
+ gchar* msg_utf8 = msg ? g_convert (msg, strlen (msg),
+ "UTF-8", "ISO_8859-1",
+ NULL, &size_dummy, NULL)
+ : NULL;
+ memmove (to_client + to_client_end, msg_utf8, strlen (msg_utf8));
+ tracef ("-> client: %s\n", msg_utf8);
+ to_client_end += strlen (msg_utf8);
+ g_free (msg_utf8);
+#else /* 1 */
memmove (to_client + to_client_end, msg, strlen (msg));
tracef ("-> client: %s\n", msg);
to_client_end += strlen (msg);
+ g_free (msg_utf8);
+#endif /* not 1 */
return FALSE;
}
More information about the Openvas-commits
mailing list