Commit 3b6c25b0f341a61d89991d0fe55553763f517cd0

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

Updating release check.

client/src/session/local/init.cc
... ... @@ -74,9 +74,23 @@
74 74 // Setup callbacks
75 75 struct lib3270_session_callbacks *cbk;
76 76  
77   - cbk = lib3270_get_session_callbacks(this->hSession,sizeof(struct lib3270_session_callbacks));
  77 + cbk = lib3270_get_session_callbacks(this->hSession,LIB3270_STRINGIZE_VALUE_OF(LIB3270_REVISION),sizeof(struct lib3270_session_callbacks));
78 78 if(!cbk) {
79   - throw runtime_error( _("Invalid callback table, possible version mismatch in lib3270") );
  79 +
  80 + string message(_("Invalid callback table; "));
  81 + message += "lib";
  82 + message += LIB3270_STRINGIZE_VALUE_OF(LIB3270_NAME);
  83 +
  84 + if(strcasecmp(LIB3270_STRINGIZE_VALUE_OF(LIB3270_REVISION),lib3270_get_revision())) {
  85 + message += _(" is not in the required revision " );
  86 + message += LIB3270_STRINGIZE_VALUE_OF(LIB3270_REVISION);
  87 + message += ".";
  88 + } else {
  89 + message += _(" is invalid.");
  90 + }
  91 +
  92 + throw runtime_error(message);
  93 +
80 94 }
81 95  
82 96 cbk->update_connect = connectHandler;
... ...
server/src/core/tools.c
... ... @@ -28,6 +28,8 @@
28 28 */
29 29  
30 30 #include <lib3270.h>
  31 +#include <errno.h>
  32 +#include <string.h>
31 33 #include <ipc-glib.h>
32 34  
33 35 /*--[ Implement ]------------------------------------------------------------------------------------*/
... ...