Commit 5dfaf51cdd321b789665883e8766bb37e3836da6

Authored by Perry Werneck
1 parent bc6dc9b3
Exists in master and in 1 other branch develop

Fixing d-bus calls.

server/src/core/linux/gobject.c
... ... @@ -197,18 +197,23 @@ void ipc3270_add_terminal_introspection(GString *introspection) {
197 197 " <arg type='u' name='attribute' direction='out' />" \
198 198 " </method>" \
199 199  
  200 + " <method name= 'waitForString'>" \
  201 + " <arg type='s' name='text' direction='in' />" \
  202 + " <arg type='u' name='seconds' direction='in' />" \
  203 + " <arg type='i' name='result' direction='out' />" \
  204 + " </method>" \
200 205 " <method name= 'waitForStringAt'>" \
201 206 " <arg type='u' name='row' direction='in' />" \
202 207 " <arg type='u' name='col' direction='in' />" \
203 208 " <arg type='s' name='text' direction='in' />" \
204 209 " <arg type='u' name='seconds' direction='in' />" \
205   - " <arg type='u' name='attribute' direction='out' />" \
  210 + " <arg type='i' name='result' direction='out' />" \
206 211 " </method>" \
207 212 " <method name= 'waitForStringAtAddress'>" \
208 213 " <arg type='i' name='addr' direction='in' />" \
209 214 " <arg type='s' name='text' direction='in' />" \
210 215 " <arg type='u' name='seconds' direction='in' />" \
211   - " <arg type='u' name='attribute' direction='out' />" \
  216 + " <arg type='i' name='result' direction='out' />" \
212 217 " </method>" \
213 218  
214 219 " <property type='s' name='version' access='read'/>" \
... ...
server/src/core/methods/wait.c
... ... @@ -36,17 +36,17 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject
36 36  
37 37 H3270 *hSession = ipc3270_get_session(session);
38 38 int rc = 0;
39   - guint seconds = 1;
  39 + guint seconds = 10;
40 40 gchar *text = NULL;
41 41  
42 42 if(*error)
43 43 return 0;
44 44  
45 45 switch(g_variant_n_children(request)) {
46   - case 1: // Just text
  46 + case 2: // Text & timeout
47 47 {
48 48 gchar *text = NULL;
49   - g_variant_get(request, "(&su)", &text, seconds);
  49 + g_variant_get(request, "(&su)", &text, &seconds);
50 50  
51 51 if(text) {
52 52  
... ... @@ -59,7 +59,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject
59 59  
60 60 break;
61 61  
62   - case 2: // Address and text
  62 + case 3: // Address, text & timeout
63 63 {
64 64 gint addr;
65 65 g_variant_get(request, "(i&su)", &addr, &text, &seconds);
... ... @@ -74,7 +74,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject
74 74 }
75 75 break;
76 76  
77   - case 3: // Row, col & text
  77 + case 4: // Row, col, text & timeout
78 78 {
79 79 guint row, col;
80 80 g_variant_get(request, "(uu&su)", &row, &col, &text, &seconds);
... ...