Commit 6f106f40e225e3d7d62ebc68a9d7cfa8d038d53c
1 parent
2bdf2b3e
Exists in
master
and in
1 other branch
Debbuing API calls.
Showing
4 changed files
with
18 additions
and
0 deletions
Show diff stats
client/src/session/remote/wait.cc
| ... | ... | @@ -182,6 +182,8 @@ |
| 182 | 182 | |
| 183 | 183 | string key = convertToHost(text,-1); |
| 184 | 184 | |
| 185 | + debug((const char *) __FUNCTION__, "(", (int) row, ",", (int) col, ", \"", text, "\", length=", key.size()); | |
| 186 | + | |
| 185 | 187 | wait(seconds, [this, key, row, col]() { |
| 186 | 188 | |
| 187 | 189 | int rc; |
| ... | ... | @@ -194,6 +196,7 @@ |
| 194 | 196 | .call() |
| 195 | 197 | .pop(rc); |
| 196 | 198 | |
| 199 | + debug("rc=",rc); | |
| 197 | 200 | return rc; |
| 198 | 201 | |
| 199 | 202 | }); | ... | ... |
server/src/core/methods/get.c
| ... | ... | @@ -35,6 +35,8 @@ int ipc3270_method_get_string(GObject *session, GVariant *request, GObject *resp |
| 35 | 35 | |
| 36 | 36 | lib3270_autoptr(char) text = NULL; |
| 37 | 37 | |
| 38 | + debug("%s with %d arguments",__FUNCTION__,(int) g_variant_n_children(request)); | |
| 39 | + | |
| 38 | 40 | switch(g_variant_n_children(request)) { |
| 39 | 41 | case 0: // No arguments |
| 40 | 42 | { |
| ... | ... | @@ -62,8 +64,11 @@ int ipc3270_method_get_string(GObject *session, GVariant *request, GObject *resp |
| 62 | 64 | |
| 63 | 65 | g_variant_get(request, "(uuiy)", &row, &col, &len, &lf); |
| 64 | 66 | |
| 67 | + debug("lib3270_get_string_at(%d,%d,%d,%d",row,col,len,lf); | |
| 65 | 68 | text = lib3270_get_string_at(hSession, row, col, len, lf); |
| 66 | 69 | |
| 70 | + debug("response=%s",text); | |
| 71 | + | |
| 67 | 72 | } |
| 68 | 73 | break; |
| 69 | 74 | ... | ... |
server/src/core/methods/wait.c
| ... | ... | @@ -42,6 +42,8 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject |
| 42 | 42 | if(*error) |
| 43 | 43 | return 0; |
| 44 | 44 | |
| 45 | + debug("%s with %d arguments",__FUNCTION__,(int) g_variant_n_children(request)); | |
| 46 | + | |
| 45 | 47 | switch(g_variant_n_children(request)) { |
| 46 | 48 | case 2: // Text & timeout |
| 47 | 49 | { |
| ... | ... | @@ -84,6 +86,7 @@ int ipc3270_method_wait_for_string(GObject *session, GVariant *request, GObject |
| 84 | 86 | g_autofree gchar * converted = g_convert_with_fallback(text,-1,lib3270_get_display_charset(hSession),"UTF-8","?",NULL,NULL,error); |
| 85 | 87 | rc = lib3270_wait_for_string_at(hSession,row,col,converted,seconds); |
| 86 | 88 | |
| 89 | + debug("lib3270_wait_for_string_at(%d,%d,\"%s\")=%d",row,col,converted,rc); | |
| 87 | 90 | } |
| 88 | 91 | |
| 89 | 92 | } | ... | ... |