Commit d54fb7ab4f6f5ff8bab7ca6b5ad38a493aaa1cd5

Authored by Perry Werneck
1 parent bbc56d7a

Storing ssl error popup info directly on windows event log when the

notification is disabled.
Showing 1 changed file with 23 additions and 0 deletions   Show diff stats
src/ssl/negotiate.c
... ... @@ -452,6 +452,28 @@ int popup_ssl_error(H3270 *hSession, int rc, const char *title, const char *summ
452 452 else
453 453 message = lib3270_strdup_printf("rc=%d",rc);
454 454  
  455 +#ifdef _WIN32
  456 +
  457 + const char *outMsg[] = {
  458 + title,
  459 + summary,
  460 + message
  461 + };
  462 +
  463 + ReportEvent(
  464 + hEventLog,
  465 + EVENTLOG_ERROR_TYPE,
  466 + 1,
  467 + 0,
  468 + NULL,
  469 + 3,
  470 + 0,
  471 + outMsg,
  472 + NULL
  473 + );
  474 +
  475 +#else
  476 +
455 477 lib3270_write_log(
456 478 hSession,
457 479 "SSL",
... ... @@ -461,6 +483,7 @@ int popup_ssl_error(H3270 *hSession, int rc, const char *title, const char *summ
461 483 message
462 484 );
463 485  
  486 +#endif // _WIN32
464 487  
465 488 return 0;
466 489 #endif // SSL_ENABLE_NOTIFICATION_WHEN_FAILED
... ...