Mercurial > pidgin
diff libpurple/status.c @ 22262:edca47ee06c5
Kill off gc->prpl in the core everywhere but connection.c (when the struct
is hidden, it will exist there and be accessible). While I was here I fixed
some other minor struct member usage along the way, including attention type
stuff I missed when I initially added its new API. I also fixed a couple
initializations that will warn on some strict non-gcc compilers.
| author | John Bailey <rekkanoryo@rekkanoryo.org> |
|---|---|
| date | Sun, 03 Feb 2008 19:43:41 +0000 |
| parents | 944f7ada49e0 |
| children | f9cdfdae0594 |
line wrap: on
line diff
--- a/libpurple/status.c Sun Feb 03 19:38:02 2008 +0000 +++ b/libpurple/status.c Sun Feb 03 19:43:41 2008 +0000 @@ -1310,7 +1310,8 @@ else if (purple_presence_get_context(presence) == PURPLE_PRESENCE_CONTEXT_ACCOUNT) { PurpleAccount *account; - PurpleConnection *gc; + PurpleConnection *gc = NULL; + PurplePlugin *prpl = NULL; PurplePluginProtocolInfo *prpl_info = NULL; account = purple_presence_get_account(presence); @@ -1339,9 +1340,11 @@ gc = purple_account_get_connection(account); - if (gc != NULL && PURPLE_CONNECTION_IS_CONNECTED(gc) && - gc->prpl != NULL) - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); + if(gc) + prpl = purple_connection_get_prpl(gc); + + if(PURPLE_CONNECTION_IS_CONNECTED(gc) && prpl != NULL) + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); if (prpl_info && prpl_info->set_idle) prpl_info->set_idle(gc, (idle ? (current_time - idle_time) : 0));
