Mercurial > hg > nnchat
changeset 416:8bb69e749d97
Rename some functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 24 May 2012 07:02:30 +0300 |
parents | 8263cb88556a |
children | ccee77fe4525 |
files | main.c |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Thu May 24 06:50:25 2012 +0300 +++ b/main.c Thu May 24 07:02:30 2012 +0300 @@ -638,7 +638,7 @@ } -int nnproto_handle_user(nn_conn_t *conn) +int nnproto_parse_user(nn_conn_t *conn) { static const char *msg = "</USER><MESSAGE>"; char *p = conn->ptr; @@ -754,7 +754,7 @@ } -int nnproto_handle_login(nn_conn_t *conn) +int nnproto_parse_login(nn_conn_t *conn) { char tmpStr[256]; str_get_timestamp(tmpStr, sizeof(tmpStr), "%c"); @@ -775,7 +775,7 @@ } -int nnproto_handle_add_user(nn_conn_t *conn) +int nnproto_parse_add_user(nn_conn_t *conn) { char *p, *s, *str = conn->ptr; nn_window_t *win; @@ -799,7 +799,7 @@ } -int nnproto_handle_delete_user(nn_conn_t *conn) +int nnproto_parse_delete_user(nn_conn_t *conn) { char *p, *s, *str = conn->ptr; nn_window_t *win; @@ -823,14 +823,14 @@ } -int nnproto_handle_num_clients(nn_conn_t *conn) +int nnproto_parse_num_clients(nn_conn_t *conn) { nn_conn_buf_strstr(conn, "</NUMCLIENTS>"); return 0; } -int nnproto_handle_boot(nn_conn_t *conn) +int nnproto_parse_boot(nn_conn_t *conn) { (void) conn; errorMsg("Booted by server.\n"); @@ -848,12 +848,12 @@ static nn_protocolcmd_t protoCmds[] = { - { "<USER>", -1, nnproto_handle_user }, - { "<LOGIN_", -1, nnproto_handle_login }, - { "<DELETE_USER>", -1, nnproto_handle_delete_user }, - { "<ADD_USER>", -1, nnproto_handle_add_user }, - { "<NUMCLIENTS>", -1, nnproto_handle_num_clients }, - { "<BOOT />", -1, nnproto_handle_boot }, + { "<USER>", -1, nnproto_parse_user }, + { "<LOGIN_", -1, nnproto_parse_login }, + { "<DELETE_USER>", -1, nnproto_parse_delete_user }, + { "<ADD_USER>", -1, nnproto_parse_add_user }, + { "<NUMCLIENTS>", -1, nnproto_parse_num_clients }, + { "<BOOT />", -1, nnproto_parse_boot }, }; static const int nprotoCmds = sizeof(protoCmds) / sizeof(protoCmds[0]);