# HG changeset patch # User Matti Hamalainen # Date 1404429532 -10800 # Node ID 02e1307e2a622ce62bfcb474e9d963ae3d62844d # Parent bda973fa2b3b59c15162c3b9e2d52037b4675226 API changes in th_network module. diff -r bda973fa2b3b -r 02e1307e2a62 main.c --- a/main.c Wed Jun 25 09:33:05 2014 +0300 +++ b/main.c Fri Jul 04 02:18:52 2014 +0300 @@ -636,7 +636,7 @@ char *name, *msg, *t; // Find start of the message - name = conn->ptr; + name = conn->base.ptr; t = th_conn_buf_strstr(conn, ""); if (!t) return 1; *t = 0; @@ -644,7 +644,7 @@ // Find end of the message t = th_conn_buf_strstr(conn, ""); if (!t) return 2; - msg = conn->ptr; + msg = conn->base.ptr; t = th_conn_buf_strstr(conn, ""); if (!t) return 3; @@ -799,7 +799,7 @@ int nnproto_parse_add_user(th_conn_t *conn) { - char *p, *s, *str = conn->ptr; + char *p, *s, *str = conn->base.ptr; nn_window_t *win; s = th_conn_buf_strstr(conn, ""); @@ -827,7 +827,7 @@ int nnproto_parse_delete_user(th_conn_t *conn) { - char *p, *s, *str = conn->ptr; + char *p, *s, *str = conn->base.ptr; nn_window_t *win; s = th_conn_buf_strstr(conn, ""); @@ -910,7 +910,7 @@ if (optDebug) { - printMsg(NULL, "Unknown protocmd: \"%s\"\n", conn->ptr); + printMsg(NULL, "Unknown protocmd: \"%s\"\n", conn->base.ptr); return 0; } else @@ -2316,8 +2316,8 @@ cres = th_conn_pull(conn); if (cres == TH_CONN_DATA_AVAIL) { - while (conn->ptr < conn->in_ptr && - *(conn->in_ptr - 1) == 0 && + while (conn->base.ptr < conn->base.in_ptr && + *(conn->base.in_ptr - 1) == 0 && retries > 0 && !editState.isError) { // th_conn_dump_buffer(stderr, conn); @@ -2334,8 +2334,8 @@ goto packet_retry; // Couldn't handle the message for some reason - printMsg(currWin, "Could not handle: %s\n", conn->ptr); - th_conn_buf_skip(conn, strlen(conn->ptr) + 1); + printMsg(currWin, "Could not handle: %s\n", conn->base.ptr); + th_conn_buf_skip(conn, strlen(conn->base.ptr) + 1); } else editState.isError = TRUE;