Mercurial > pidgin.yaz
diff src/protocols/oscar/chat.c @ 11074:ba630d7a7365
[gaim-migrate @ 13083]
sf patch #1233671, from Ryan McCabe
eliminate the usage of ->priv in libfaim
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 09 Jul 2005 19:26:49 +0000 |
parents | b45613311dab |
children | bd8ac1d4b2f2 |
line wrap: on
line diff
--- a/src/protocols/oscar/chat.c Sat Jul 09 19:19:53 2005 +0000 +++ b/src/protocols/oscar/chat.c Sat Jul 09 19:26:49 2005 +0000 @@ -8,7 +8,7 @@ #include <string.h> -/* Stored in the ->priv of chat connections */ +/* Stored in the ->internal of chat connections */ struct chatconnpriv { fu16_t exchange; char *name; @@ -17,7 +17,7 @@ faim_internal void aim_conn_kill_chat(aim_session_t *sess, aim_conn_t *conn) { - struct chatconnpriv *ccp = (struct chatconnpriv *)conn->priv; + struct chatconnpriv *ccp = (struct chatconnpriv *)conn->internal; if (ccp) free(ccp->name); @@ -36,7 +36,7 @@ if (conn->type != AIM_CONN_TYPE_CHAT) return NULL; - ccp = (struct chatconnpriv *)conn->priv; + ccp = (struct chatconnpriv *)conn->internal; return ccp->name; } @@ -47,11 +47,11 @@ aim_conn_t *cur; for (cur = sess->connlist; cur; cur = cur->next) { - struct chatconnpriv *ccp = (struct chatconnpriv *)cur->priv; + struct chatconnpriv *ccp = (struct chatconnpriv *)cur->internal; if (cur->type != AIM_CONN_TYPE_CHAT) continue; - if (!cur->priv) { + if (!cur->internal) { faimdprintf(sess, 0, "faim: chat: chat connection with no name! (fd = %d)\n", cur->fd); continue; } @@ -70,8 +70,8 @@ if (!conn || !roomname) return -EINVAL; - if (conn->priv) - free(conn->priv); + if (conn->internal) + free(conn->internal); if (!(ccp = malloc(sizeof(struct chatconnpriv)))) return -ENOMEM; @@ -80,7 +80,7 @@ ccp->name = strdup(roomname); ccp->instance = instance; - conn->priv = (void *)ccp; + conn->internal = (void *)ccp; return 0; }