Commit 33f0f0e0c920ab67dc9c3c027ba35485413f5b80
1 parent
b0f3c135
Exists in
master
and in
1 other branch
Updating IPC plugin module to the new LIB3270_ACTION based elements.
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
server/src/core/linux/gobject.c
| ... | ... | @@ -212,7 +212,7 @@ void ipc3270_add_terminal_introspection(GString *introspection) { |
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | 214 | // Constrói métodos usando a tabela de controle |
| 215 | - const LIB3270_ACTION_ENTRY * actions = lib3270_get_action_table(); | |
| 215 | + const LIB3270_ACTION * actions = lib3270_get_actions(); | |
| 216 | 216 | for(ix = 0; actions[ix].name; ix++) |
| 217 | 217 | { |
| 218 | 218 | g_string_append_printf( | ... | ... |
server/src/core/methods/methods.c
| ... | ... | @@ -98,12 +98,14 @@ int ipc3270_method_call(GObject *object, const gchar *method_name, GVariant *req |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // Check actions table. |
| 101 | - const LIB3270_ACTION_ENTRY * actions = lib3270_get_action_table(); | |
| 101 | + const LIB3270_ACTION * actions = lib3270_get_actions(); | |
| 102 | 102 | for(ix = 0; actions[ix].name; ix++) { |
| 103 | 103 | |
| 104 | 104 | if(!g_ascii_strcasecmp(actions[ix].name,method_name)) { |
| 105 | 105 | |
| 106 | - if(actions[ix].call(hSession)) | |
| 106 | + if(!actions[ix].enabled(hSession)) | |
| 107 | + ipc3270_set_error(object,EPERM,error); | |
| 108 | + else if(actions[ix].activate(hSession)) | |
| 107 | 109 | ipc3270_set_error(object,errno,error); |
| 108 | 110 | else |
| 109 | 111 | ipc3270_response_append_int32(response, 0); | ... | ... |