Mercurial > hg > nnchat
comparison main.c @ 624:24d97c710497
Adjust to changes in API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 21 Jun 2014 02:56:14 +0300 |
parents | 118276b60667 |
children | edac1485308d |
comparison
equal
deleted
inserted
replaced
623:118276b60667 | 624:24d97c710497 |
---|---|
2254 goto err_exit; | 2254 goto err_exit; |
2255 } | 2255 } |
2256 else | 2256 else |
2257 { | 2257 { |
2258 int cres = th_conn_pull(conn); | 2258 int cres = th_conn_pull(conn); |
2259 if (cres == 0) | 2259 if (cres == TH_CONN_DATA_AVAIL) |
2260 { | 2260 { |
2261 printMsg(currWin, "Probe got: %s\n", conn->buf); | 2261 printMsg(currWin, "Probe got: %s\n", conn->buf); |
2262 } | 2262 } |
2263 else | 2263 else |
2264 { | 2264 { |
2295 int retries = 3, cres; | 2295 int retries = 3, cres; |
2296 editState.update = FALSE; | 2296 editState.update = FALSE; |
2297 | 2297 |
2298 packet_retry: | 2298 packet_retry: |
2299 cres = th_conn_pull(conn); | 2299 cres = th_conn_pull(conn); |
2300 if (cres == 0) | 2300 if (cres == TH_CONN_DATA_AVAIL) |
2301 { | 2301 { |
2302 while (conn->ptr < conn->in_ptr && | 2302 while (conn->ptr < conn->in_ptr && |
2303 *(conn->in_ptr - 1) == 0 && | 2303 *(conn->in_ptr - 1) == 0 && |
2304 retries > 0 && !editState.isError) | 2304 retries > 0 && !editState.isError) |
2305 { | 2305 { |
2323 else | 2323 else |
2324 editState.isError = TRUE; | 2324 editState.isError = TRUE; |
2325 } | 2325 } |
2326 } | 2326 } |
2327 else | 2327 else |
2328 if (cres < 0 || !th_conn_check(conn)) | 2328 if (cres < TH_CONN_ERROR || !th_conn_check(conn)) |
2329 editState.isError = TRUE; | 2329 editState.isError = TRUE; |
2330 | 2330 |
2331 // Handle user input | 2331 // Handle user input |
2332 BOOL flushed = FALSE; | 2332 BOOL flushed = FALSE; |
2333 if (appCursesInit) | 2333 if (appCursesInit) |