Commit 764f7d1131219869fa8fddbca685fbac67d9c2d8
1 parent
ba9c900f
Exists in
master
and in
5 other branches
Ajustando API D-Bus
Showing
1 changed file
with
2 additions
and
33 deletions
Show diff stats
src/libpw3270cpp/remote.cc
| ... | ... | @@ -817,38 +817,6 @@ |
| 817 | 817 | return (LIB3270_SSL_STATE) query_intval(HLLAPI_PACKET_GET_SSL_STATE); |
| 818 | 818 | } |
| 819 | 819 | |
| 820 | -/* | |
| 821 | - int connect(void) | |
| 822 | - { | |
| 823 | - int rc; | |
| 824 | - | |
| 825 | -#if defined(WIN32) | |
| 826 | - | |
| 827 | - size_t cbSize = sizeof(struct hllapi_packet_connect); | |
| 828 | - struct hllapi_packet_connect * pkt = (struct hllapi_packet_connect *) malloc(cbSize); | |
| 829 | - | |
| 830 | - memset(pkt,0,cbSize); | |
| 831 | - | |
| 832 | - pkt->packet_id = HLLAPI_PACKET_CONNECT; | |
| 833 | - pkt->wait = 0; | |
| 834 | - | |
| 835 | - rc = query_intval((void *) pkt,cbSize,true); | |
| 836 | - | |
| 837 | -#elif defined(HAVE_DBUS) | |
| 838 | - | |
| 839 | - static const char * str = ""; | |
| 840 | - | |
| 841 | - rc = query_intval("connect", DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID); | |
| 842 | - | |
| 843 | -#else | |
| 844 | - rc = -1; | |
| 845 | - | |
| 846 | -#endif | |
| 847 | - return rc; | |
| 848 | - | |
| 849 | - } | |
| 850 | -*/ | |
| 851 | - | |
| 852 | 820 | virtual int connect() |
| 853 | 821 | { |
| 854 | 822 | return connect("",0); |
| ... | ... | @@ -1191,13 +1159,14 @@ |
| 1191 | 1159 | |
| 1192 | 1160 | dbus_int32_t b = (dbus_int32_t) baddr; |
| 1193 | 1161 | dbus_int32_t l = (dbus_int32_t) len; |
| 1162 | + unsigned char d = '\n'; | |
| 1194 | 1163 | |
| 1195 | 1164 | DBusMessage * msg = create_message("getText"); |
| 1196 | 1165 | if(!msg) |
| 1197 | 1166 | return NULL; |
| 1198 | 1167 | |
| 1199 | 1168 | trace("%s(%d,%d)",__FUNCTION__,b,l); |
| 1200 | - dbus_message_append_args(msg, DBUS_TYPE_INT32, &b, DBUS_TYPE_INT32, &l, DBUS_TYPE_INVALID); | |
| 1169 | + dbus_message_append_args(msg, DBUS_TYPE_INT32, &b, DBUS_TYPE_INT32, &l, DBUS_TYPE_BYTE, &d, DBUS_TYPE_INVALID); | |
| 1201 | 1170 | |
| 1202 | 1171 | return get_string(call(msg)); |
| 1203 | 1172 | #else | ... | ... |