# HG changeset patch # User Mark Doliner # Date 1120937209 0 # Node ID ba630d7a7365128fa18eb696b3a1fc3c68ef09f4 # Parent 634fec5ed0f2964e3ed2783ec45c4a2e1bc589ea [gaim-migrate @ 13083] sf patch #1233671, from Ryan McCabe eliminate the usage of ->priv in libfaim committer: Tailor Script diff -r 634fec5ed0f2 -r ba630d7a7365 src/protocols/oscar/chat.c --- 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 -/* 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; } diff -r 634fec5ed0f2 -r ba630d7a7365 src/protocols/oscar/conn.c --- a/src/protocols/oscar/conn.c Sat Jul 09 19:19:53 2005 +0000 +++ b/src/protocols/oscar/conn.c Sat Jul 09 19:26:49 2005 +0000 @@ -162,14 +162,6 @@ aim_conn_close(*deadconn); /* - * XXX ->priv should never be touched by the library. I know - * it used to be, but I'm getting rid of all that. Use - * ->internal instead. - */ - if ((*deadconn)->priv) - free((*deadconn)->priv); - - /* * This will free ->internal if it necessary... */ if ((*deadconn)->type == AIM_CONN_TYPE_CHAT)