Commit 0d1d338e4dfdda154394430f2687514acab4a186

Authored by Perry Werneck
1 parent c5066fd5

Fixing typeahead problem.

src/core/ctlr.c
... ... @@ -2313,12 +2313,10 @@ int ctlr_dbcs_postprocess(H3270 *hSession)
2313 2313 */
2314 2314 void ps_process(H3270 *hSession)
2315 2315 {
2316   - while(run_ta(hSession))
2317   - ;
  2316 + while(run_ta(hSession));
2318 2317  
2319   -// sms_continue();
  2318 + screen_update(hSession,0,hSession->view.rows * hSession->view.cols);
2320 2319  
2321   -#if defined(X3270_FT)
2322 2320 /* Process file transfers. */
2323 2321 if (lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE && /* transfer in progress */
2324 2322 hSession->formatted && /* screen is formatted */
... ... @@ -2329,7 +2327,7 @@ void ps_process(H3270 *hSession)
2329 2327 {
2330 2328 ft_cut_data(hSession);
2331 2329 }
2332   -#endif
  2330 +
2333 2331 }
2334 2332  
2335 2333 /*
... ...
src/core/keyboard/kybd.c
... ... @@ -935,17 +935,23 @@ LIB3270_EXPORT int lib3270_input_string(H3270 *hSession, const unsigned char *st
935 935 int rc = 0;
936 936  
937 937 if(check_online_session(hSession))
  938 + {
  939 + trace("%s: %s",__FUNCTION__,strerror(errno));
938 940 return errno;
  941 + }
939 942  
940 943 if(length < 0)
941 944 length = strlen((char *) str);
942 945  
943   - if(hSession->kybdlock)
944   - return (errno = EPERM);
945   -
946 946 int pos;
947 947 for(pos = 0; pos < length && str[pos] && !rc; pos++)
  948 + {
  949 + if (KYBDLOCK_IS_OERR(hSession))
  950 + return (errno = EPERM);
  951 +
948 952 rc = key_ACharacter(hSession,(str[pos] & 0xff), KT_STD, IA_KEY, NULL);
  953 + trace("%s: key_ACharacter(%c)=%d",__FUNCTION__,str[pos] & 0xff,rc);
  954 + }
949 955  
950 956 screen_update(hSession,0,hSession->view.rows * hSession->view.cols);
951 957  
... ...
src/selection/selection.c
... ... @@ -307,7 +307,7 @@ LIB3270_EXPORT char * lib3270_get_string_at_address(H3270 *h, int offset, int le
307 307  
308 308 memset(buffer,0,len+1);
309 309  
310   - trace("len=%d buffer=%p",len,buffer);
  310 + // trace("len=%d buffer=%p",len,buffer);
311 311  
312 312 while(len > 0)
313 313 {
... ...