Commit 928fee2886859edaf9f26d347f767b27e509f39f

Authored by Perry Werneck
1 parent ed00bf66
Exists in master and in 2 other branches develop, macos

Logging invalid callback table.

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
src/core/session.c
... ... @@ -556,13 +556,15 @@ struct lib3270_session_callbacks * lib3270_get_session_callbacks(H3270 *hSession
556 556  
557 557 if(revision && strcasecmp(revision,REQUIRED_REVISION) < 0)
558 558 {
559   - debug("%s: Revision test was %d",__FUNCTION__,strcasecmp(revision,REQUIRED_REVISION));
560 559 errno = EINVAL;
  560 + lib3270_write_log(hSession,PACKAGE_NAME,"Invalid revision %s when setting callback table",revision);
561 561 return NULL;
562 562 }
563 563  
564 564 if(sz != sizeof(struct lib3270_session_callbacks))
565 565 {
  566 +
  567 + lib3270_write_log(hSession,PACKAGE_NAME,"Invalid callback table (sz=%u expected=%u)",sz,(unsigned int) sizeof(struct lib3270_session_callbacks));
566 568 errno = EINVAL;
567 569 return NULL;
568 570 }
... ...