[-]
[+]
|
Changed |
libguac-client-vnc.changes
|
|
[-]
[+]
|
Changed |
libguac-client-vnc.spec
^
|
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/AUTHORS
^
|
@@ -1,2 +1,3 @@
Michael Jumper <zhangmaike@users.sourceforge.net>
+James Muehlner <james.muehlner@guac-dev.org>
Saul Gio Perez <gio.perez@sv.cmu.edu>
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,7 @@
+2013-05-23 James Muehlner <james.muehlner@guac-dev.org>
+
+ * convert() should return NULL only on malloc failure (fixes #313)
+
2013-02-07 Saul Gio Perez <gio.perez@sv.cmu.edu>
* Implement color-depth parameter (fixes #272)
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/configure
^
|
@@ -2758,7 +2758,7 @@
# Define the identity of the package.
PACKAGE=libguac-client-vnc
- VERSION=0.7.1
+ VERSION=0.7.2
cat >>confdefs.h <<_ACEOF
@@ -10553,10 +10553,9 @@
$as_echo "$as_me: WARNING: \"libvncclient is required\"" >&2;}
fi
-#AC_CHECK_LIB([iconv], [iconv],, AC_MSG_WARN("libiconv is required"))
# Checks for header files.
-for ac_header in stdlib.h string.h syslog.h guacamole/client.h guacamole/socket.h guacamole/protocol.h
+for ac_header in stdlib.h string.h syslog.h guacamole/client.h guacamole/socket.h guacamole/protocol.h iconv.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/configure.in
^
|
@@ -35,7 +35,7 @@
# ***** END LICENSE BLOCK *****
AC_INIT(src/client.c)
-AM_INIT_AUTOMAKE([libguac-client-vnc], 0.7.1)
+AM_INIT_AUTOMAKE([libguac-client-vnc], 0.7.2)
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
@@ -46,10 +46,9 @@
AC_CHECK_LIB([guac], [guac_client_plugin_open],, AC_MSG_ERROR("libguac must be installed first"))
AC_CHECK_LIB([cairo], [cairo_create],, AC_MSG_ERROR("cairo is required for drawing instructions"))
AC_CHECK_LIB([vncclient], [rfbInitClient],, AC_MSG_ERROR("libvncclient is required"))
-#AC_CHECK_LIB([iconv], [iconv],, AC_MSG_ERROR("libiconv is required"))
# Checks for header files.
-AC_CHECK_HEADERS([stdlib.h string.h syslog.h guacamole/client.h guacamole/socket.h guacamole/protocol.h])
+AC_CHECK_HEADERS([stdlib.h string.h syslog.h guacamole/client.h guacamole/socket.h guacamole/protocol.h iconv.h])
# Checks for library functions.
AC_FUNC_MALLOC
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/src/convert.c
^
|
@@ -94,10 +94,8 @@
output_buffer = output + bytes_converted;
}
else if (errno == EILSEQ) {
- /* Cannot convert because an invalid sequence was discovered */
- iconv_close(cd);
- free(output);
- return NULL;
+ /* Invalid sequence detected, return what's been converted so far */
+ break;
}
else if (errno == EINVAL) {
/* Incomplete sequence detected, can be ignored */
|
[-]
[+]
|
Changed |
libguac-client-vnc-0.7.2.tar.bz2/src/guac_handlers.c
^
|
@@ -95,11 +95,20 @@
rfbClient* rfb_client = ((vnc_guac_client_data*) client->data)->rfb_client;
/* Convert UTF-8 character data to ISO_8859-1 */
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
+ char* iso_8559_1_data = convert("UTF-8", "ISO_8859-1//TRANSLIT", data);
+ #else
char* iso_8559_1_data = convert("UTF-8", "ISO_8859-1", data);
+ #endif
- SendClientCutText(rfb_client, iso_8559_1_data, strlen(iso_8559_1_data));
-
- free(iso_8559_1_data);
+ /* If the conversion was successful, send the converted character data. */
+ if(iso_8559_1_data) {
+ SendClientCutText(rfb_client, iso_8559_1_data, strlen(iso_8559_1_data));
+ free(iso_8559_1_data);
+ /* Otherwise, just send an empty string. */
+ }
+ else
+ SendClientCutText(rfb_client, "", 0);
return 0;
}
|