Commit 1ae1823a277d675f966316d391a92b7b6aa03054
1 parent
f7d65908
Exists in
master
and in
3 other branches
Fixing segfault on v3270.
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/lib3270/session.c
... | ... | @@ -257,6 +257,8 @@ static void set_peer_certificate)(const void *cert unused) |
257 | 257 | void lib3270_reset_callbacks(H3270 *hSession) |
258 | 258 | { |
259 | 259 | // Default calls |
260 | + memset(&hSession->cbk,0,sizeof(hSession->cbk)); | |
261 | + | |
260 | 262 | hSession->cbk.write = lib3270_sock_send; |
261 | 263 | hSession->cbk.disconnect = lib3270_sock_disconnect; |
262 | 264 | hSession->cbk.update = update_char; |
... | ... | @@ -281,6 +283,8 @@ void lib3270_reset_callbacks(H3270 *hSession) |
281 | 283 | hSession->cbk.set_timer = set_timer; |
282 | 284 | hSession->cbk.print = print; |
283 | 285 | hSession->cbk.set_peer_certificate = set_peer_certificate; |
286 | + hSession->cbk.update_luname = (void (*)(H3270 *, const char *)) nop_int; | |
287 | + | |
284 | 288 | } |
285 | 289 | |
286 | 290 | static void lib3270_session_init(H3270 *hSession, const char *model, const char *charset) | ... | ... |