From e6700e822336854400f225f99df7e5f30f6c6504 Mon Sep 17 00:00:00 2001 From: PerryWerneck Date: Tue, 7 Mar 2017 09:09:07 -0300 Subject: [PATCH] Corrigido retorno do método set_text_at --- src/lib3270/paste.c | 5 +++-- src/plugins/dbus3270/gobject.c | 5 ++++- src/plugins/dbus3270/pw3270dbus.xml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib3270/paste.c b/src/lib3270/paste.c index a5c035e..4c2a772 100644 --- a/src/lib3270/paste.c +++ b/src/lib3270/paste.c @@ -223,7 +223,7 @@ static int set_string(H3270 *hSession, const unsigned char *str) LIB3270_EXPORT int lib3270_set_string_at(H3270 *hSession, int row, int col, const unsigned char *str) { - int rc = -1; + int rc = 0; CHECK_SESSION_HANDLE(hSession); @@ -241,11 +241,12 @@ LIB3270_EXPORT int lib3270_set_string_at(H3270 *hSession, int row, int col, cons hSession->cbk.suspend(hSession); hSession->cursor_addr = (row * hSession->cols) + col; - rc = set_string(hSession, str); + rc += set_string(hSession, str); hSession->cbk.resume(hSession); } + trace("%s rc=%d",__FUNCTION__,rc); return rc; } diff --git a/src/plugins/dbus3270/gobject.c b/src/plugins/dbus3270/gobject.c index f530c6b..a557a67 100644 --- a/src/plugins/dbus3270/gobject.c +++ b/src/plugins/dbus3270/gobject.c @@ -261,7 +261,10 @@ void pw3270_dbus_set_text_at(PW3270Dbus *object, int row, int col, const gchar * text = g_convert_with_fallback(utftext,-1,lib3270_get_display_charset(hSession),"UTF-8","?",NULL,NULL,NULL); - dbus_g_method_return(context,lib3270_set_string_at(hSession,row,col,(const unsigned char *) text)); + int sz = lib3270_set_string_at(hSession,row,col,(const unsigned char *) text); + + trace("%s returns %d",__FUNCTION__,sz); + dbus_g_method_return(context,sz); g_free(text); } diff --git a/src/plugins/dbus3270/pw3270dbus.xml b/src/plugins/dbus3270/pw3270dbus.xml index e5e2eea..dc310b7 100644 --- a/src/plugins/dbus3270/pw3270dbus.xml +++ b/src/plugins/dbus3270/pw3270dbus.xml @@ -66,6 +66,7 @@ + -- libgit2 0.21.2