Commit 5dfaf51cdd321b789665883e8766bb37e3836da6
1 parent
bc6dc9b3
Exists in
master
and in
1 other branch
Fixing d-bus calls.
Showing
2 changed files
with
12 additions
and
7 deletions
Show diff stats
server/src/core/linux/gobject.c
| @@ -197,18 +197,23 @@ void ipc3270_add_terminal_introspection(GString *introspection) { | @@ -197,18 +197,23 @@ void ipc3270_add_terminal_introspection(GString *introspection) { | ||
| 197 | " <arg type='u' name='attribute' direction='out' />" \ | 197 | " <arg type='u' name='attribute' direction='out' />" \ |
| 198 | " </method>" \ | 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 | " <method name= 'waitForStringAt'>" \ | 205 | " <method name= 'waitForStringAt'>" \ |
| 201 | " <arg type='u' name='row' direction='in' />" \ | 206 | " <arg type='u' name='row' direction='in' />" \ |
| 202 | " <arg type='u' name='col' direction='in' />" \ | 207 | " <arg type='u' name='col' direction='in' />" \ |
| 203 | " <arg type='s' name='text' direction='in' />" \ | 208 | " <arg type='s' name='text' direction='in' />" \ |
| 204 | " <arg type='u' name='seconds' direction='in' />" \ | 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 | " </method>" \ | 211 | " </method>" \ |
| 207 | " <method name= 'waitForStringAtAddress'>" \ | 212 | " <method name= 'waitForStringAtAddress'>" \ |
| 208 | " <arg type='i' name='addr' direction='in' />" \ | 213 | " <arg type='i' name='addr' direction='in' />" \ |
| 209 | " <arg type='s' name='text' direction='in' />" \ | 214 | " <arg type='s' name='text' direction='in' />" \ |
| 210 | " <arg type='u' name='seconds' direction='in' />" \ | 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 | " </method>" \ | 217 | " </method>" \ |
| 213 | 218 | ||
| 214 | " <property type='s' name='version' access='read'/>" \ | 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,17 +36,17 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject | ||
| 36 | 36 | ||
| 37 | H3270 *hSession = ipc3270_get_session(session); | 37 | H3270 *hSession = ipc3270_get_session(session); |
| 38 | int rc = 0; | 38 | int rc = 0; |
| 39 | - guint seconds = 1; | 39 | + guint seconds = 10; |
| 40 | gchar *text = NULL; | 40 | gchar *text = NULL; |
| 41 | 41 | ||
| 42 | if(*error) | 42 | if(*error) |
| 43 | return 0; | 43 | return 0; |
| 44 | 44 | ||
| 45 | switch(g_variant_n_children(request)) { | 45 | switch(g_variant_n_children(request)) { |
| 46 | - case 1: // Just text | 46 | + case 2: // Text & timeout |
| 47 | { | 47 | { |
| 48 | gchar *text = NULL; | 48 | gchar *text = NULL; |
| 49 | - g_variant_get(request, "(&su)", &text, seconds); | 49 | + g_variant_get(request, "(&su)", &text, &seconds); |
| 50 | 50 | ||
| 51 | if(text) { | 51 | if(text) { |
| 52 | 52 | ||
| @@ -59,7 +59,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject | @@ -59,7 +59,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject | ||
| 59 | 59 | ||
| 60 | break; | 60 | break; |
| 61 | 61 | ||
| 62 | - case 2: // Address and text | 62 | + case 3: // Address, text & timeout |
| 63 | { | 63 | { |
| 64 | gint addr; | 64 | gint addr; |
| 65 | g_variant_get(request, "(i&su)", &addr, &text, &seconds); | 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,7 +74,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject | ||
| 74 | } | 74 | } |
| 75 | break; | 75 | break; |
| 76 | 76 | ||
| 77 | - case 3: // Row, col & text | 77 | + case 4: // Row, col, text & timeout |
| 78 | { | 78 | { |
| 79 | guint row, col; | 79 | guint row, col; |
| 80 | g_variant_get(request, "(uu&su)", &row, &col, &text, &seconds); | 80 | g_variant_get(request, "(uu&su)", &row, &col, &text, &seconds); |