diff --git a/src/core/popup.c b/src/core/popup.c index db847b9..5e52487 100644 --- a/src/core/popup.c +++ b/src/core/popup.c @@ -66,7 +66,15 @@ int lib3270_popup_translated(H3270 *hSession, const LIB3270_POPUP *popup, unsign translated.body = dgettext(GETTEXT_PACKAGE,popup->body); } - return hSession->cbk.popup(hSession,&translated,wait); + int rc = hSession->cbk.popup(hSession,&translated,wait); + + debug("%s - User response was '%s' (rc=%d)",__FUNCTION__,strerror(rc),rc); + + if(rc) { + lib3270_write_trace(hSession,"User response was '%s' (rc=%d)",strerror(rc),rc); + } + + return rc; } /// @brief Pop up an error dialog. diff --git a/src/core/properties/boolean.c b/src/core/properties/boolean.c index 77d971f..306c25e 100644 --- a/src/core/properties/boolean.c +++ b/src/core/properties/boolean.c @@ -219,20 +219,21 @@ const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { } int lib3270_set_boolean_property(H3270 *hSession, const char *name, int value, int seconds) { - size_t ix; - const LIB3270_INT_PROPERTY * properties; if(seconds) { lib3270_wait_for_ready(hSession, seconds); } - properties = lib3270_get_boolean_properties_list(); + size_t ix; + const LIB3270_INT_PROPERTY * properties = lib3270_get_boolean_properties_list(); for(ix = 0; properties[ix].name; ix++) { if(!strcasecmp(name,properties[ix].name)) { - if(properties[ix].set) + if(properties[ix].set) { + lib3270_write_event_trace(hSession,"%s %s\n",(value ? "Enabling" : "Disabling"),properties[ix].name); return properties[ix].set(hSession, value); - else + } else { return errno = EPERM; + } } } -- libgit2 0.21.2