pidgin/pidgin

Use ZSubscription_t in zephyr_triple

2021-01-25, Arkadiy Illarionov
1bad06536f81
Use ZSubscription_t in zephyr_triple

* Change some functions to use `ZSubscription_t`
* Cleanup redundant `zephyr_triple` allocations
* Inline `zephyr_subscribe_failed`
* Replace `find_sub_by_sub` and `find_sub_by_id` with `g_slist_find_custom`
* Rename functions related to `zephyr_triple`

Testing Done:
Compile.

Reviewed at https://reviews.imfreedom.org/r/450/
#ifndef PURPLE_ZEPHYR_INTERNAL_H
#define PURPLE_ZEPHYR_INTERNAL_H
#include <sysdep.h>
#ifdef LIBZEPHYR_EXT
#include <zephyr/zephyr.h>
#else
#include <zephyr_internal.h>
#endif
#ifdef WIN32
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 512
#endif
#define ETIMEDOUT WSAETIMEDOUT
#define EADDRINUSE WSAEADDRINUSE
#else /* !WIN32 */
#include <netdb.h>
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 4096
#endif
#endif
#ifdef ZEPHYR_USES_HESIOD
#include <hesiod.h>
#endif
#ifndef ZEPHYR_USES_KERBEROS
#define REALM_SZ MAXHOSTNAMELEN
#define INST_SZ 0 /* no instances w/o Kerberos */
#define ANAME_SZ 9 /* size of a username + null */
#define CLOCK_SKEW 300 /* max time to cache packet ids */
#endif
#endif /* PURPLE_ZEPHYR_INTERNAL_H */