diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-03 22:25:09 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-03 22:25:09 -0700 |
commit | 5772ad5d8b736f9a8639ad3c68beae059f04eb31 (patch) | |
tree | 87fc209b3f32d500cae6bfad40ae63569dfb51f7 /gatchat/ppp_cp.c | |
parent | 352ea97f8fb4977d2d3ae086472ee6c3032dc21f (diff) | |
download | ofono-5772ad5d8b736f9a8639ad3c68beae059f04eb31.tar.bz2 |
Make GAtPPP fields really private
Diffstat (limited to 'gatchat/ppp_cp.c')
-rw-r--r-- | gatchat/ppp_cp.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index cf2f5fa5..46c62c17 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -38,21 +38,13 @@ static const char *pppcp_state_strings[] = {"INITIAL", "STARTING", "CLOSED", "STOPPED", "CLOSING", "STOPPING", "REQSENT", "ACKRCVD", "ACKSENT", "OPENED" }; -static void pppcp_debug(struct pppcp_data *p, const char *func) -{ - GAtPPP *ppp = p->ppp; - char *str; - - if (!ppp || !ppp->debugf) - return; - - str = g_strdup_printf("%s: %s: current state %d:%s", - p->prefix, func, p->state, pppcp_state_strings[p->state]); - ppp->debugf(str, ppp->debug_data); - g_free(str); -} - -#define pppcp_trace(p) pppcp_debug(p, __FUNCTION__) +#define pppcp_trace(p) do { \ + char *str = g_strdup_printf("%s: %s: current state %d:%s", \ + p->prefix, __FUNCTION__, \ + p->state, pppcp_state_strings[p->state]); \ + ppp_debug(p->ppp, str); \ + g_free(str); \ +} while (0); #define pppcp_to_ppp_packet(p) \ (((guint8 *) p) - PPP_HEADROOM) |