Commit 828f2c8cf3239fc3a8421c23699084e61abbe114

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

Updating to the new action methods from lib3270.

client/src/session/local/actions.cc
... ... @@ -45,7 +45,7 @@
45 45  
46 46 void Local::Session::action(const char *action_name) {
47 47 std::lock_guard<std::mutex> lock(sync);
48   - chkResponse(lib3270_action(hSession,action_name));
  48 + chkResponse(lib3270_action_activate_by_name(action_name,hSession));
49 49 }
50 50  
51 51 void Local::Session::connect(const char *url, int seconds) {
... ...
gitsync.sh
1 1 #!/bin/bash
2 2 #
3 3 # https://help.github.com/articles/syncing-a-fork/
  4 +#
4 5 # https://help.github.com/articles/configuring-a-remote-for-a-fork/
  6 +#
5 7 # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html
6 8 #
7 9 # Setup:
8 10 #
9   -# git remote add --mirror=fetch secondary https://secondary_repo_url/secondary_repo.git
10   -# git fetch origin
11   -# git push secondary --all
  11 +# git remote add github https://github.com/PerryWerneck/lib3270.git
12 12 #
13 13 #
14 14  
15 15 git push
16 16  
17 17 git fetch origin
18   -git checkout master
19   -git merge origin/master
  18 +git merge
20 19  
21   -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}')
  20 +REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}')
  21 +
  22 +for repo in ${REPOS}
  23 +do
  24 + echo "Getting updates from ${repo} ..."
  25 + git fetch ${repo}
  26 + git merge
  27 +done
  28 +
  29 +for repo in ${REPOS}
22 30 do
23 31 echo "Updating ${repo} ..."
24 32 git push ${repo}
25 33 done
26 34  
27   -
... ...
server/src/core/methods/action.c
... ... @@ -39,7 +39,7 @@ int ipc3270_method_action(GObject *session, GVariant *request, GObject *response
39 39  
40 40 GVariant *value = g_variant_get_child_value(request,0);
41 41  
42   - ipc3270_response_append_int32(response, lib3270_action(ipc3270_get_session(session),g_variant_get_string(value,NULL)));
  42 + ipc3270_response_append_int32(response, lib3270_action_activate_by_name(g_variant_get_string(value,NULL), ipc3270_get_session(session)));
43 43  
44 44 g_variant_unref(value);
45 45  
... ...
server/src/core/methods/methods.c
... ... @@ -98,6 +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 * action = lib3270_get_action(method_name);
  102 + if(action) {
  103 + if(lib3270_action_activate(action,hSession)) {
  104 + ipc3270_set_error(object,errno,error);
  105 + }
  106 + return 0;
  107 + }
  108 + /*
101 109 const LIB3270_ACTION * actions = lib3270_get_actions();
102 110 for(ix = 0; actions[ix].name; ix++) {
103 111  
... ... @@ -114,6 +122,7 @@ int ipc3270_method_call(GObject *object, const gchar *method_name, GVariant *req
114 122  
115 123 }
116 124 }
  125 + */
117 126  
118 127 // Check lib3270 internal methods
119 128 const IPC_METHOD_INT_ARG * int_methods = ipc3270_get_int_arg_methods();
... ...