Mercurial > hg > nnchat
comparison main.c @ 436:f8d6a720388a
Fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 May 2012 20:45:12 +0300 |
parents | 708a15fdf791 |
children | 8e9690a3f973 |
comparison
equal
deleted
inserted
replaced
435:708a15fdf791 | 436:f8d6a720388a |
---|---|
1906 do { | 1906 do { |
1907 int cres = nn_conn_pull(conn); | 1907 int cres = nn_conn_pull(conn); |
1908 if (cres == 0 && *(conn->in_ptr - 1) == 0) | 1908 if (cres == 0 && *(conn->in_ptr - 1) == 0) |
1909 { | 1909 { |
1910 int result = nn_parse_protocol(conn); | 1910 int result = nn_parse_protocol(conn); |
1911 if (result == 0) | |
1912 { | |
1913 nn_conn_buf_skip(conn, 1); | |
1914 } | |
1915 else | |
1911 if (result > 0) | 1916 if (result > 0) |
1912 { | 1917 { |
1913 // Couldn't handle the message for some reason | 1918 // Couldn't handle the message for some reason |
1914 printMsg(currWin, "Could not handle: %s\n", conn->ptr); | 1919 printMsg(currWin, "Could not handle: %s\n", conn->ptr); |
1915 } | 1920 } |
1916 else if (result < 0) | 1921 else |
1917 { | 1922 { |
1918 // Fatal error, quit | 1923 // Fatal error, quit |
1919 errorMsg("Fatal error with message: %s\n", conn->ptr); | 1924 errorMsg("Fatal error with message: %s\n", conn->ptr); |
1920 isError = TRUE; | 1925 isError = TRUE; |
1921 } | 1926 } |