From b441dc34dc8273ab9ad417a6746e96f944d32dcd Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Mon, 22 Sep 2014 23:53:21 +0200 Subject: fix whitespace, use TAB for indentation the python-program ccheck.py can be used to verify that the source code does not contain any whitespace errors: https://github.com/alfredh/pytools/blob/master/ccheck.py how to use it: $ cd baresip $ ccheck.py --- modules/mwi/mwi.c | 10 +++++----- src/ua.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/mwi/mwi.c b/modules/mwi/mwi.c index cfc6d9f..9bea26a 100644 --- a/modules/mwi/mwi.c +++ b/modules/mwi/mwi.c @@ -92,7 +92,7 @@ static int mwi_subscribe(struct ua *ua) "Accept:" " application/simple-message-summary\r\n"); if (err) { - warning("mwi: subscribe ERROR: %m\n", err); + warning("mwi: subscribe ERROR: %m\n", err); } if (err) @@ -115,8 +115,8 @@ static void ua_event_handler(struct ua *ua, return; if (ev == UA_EVENT_REGISTER_OK) { - uag_event_unregister(ua_event_handler); - mwi_subscribe(ua); + uag_event_unregister(ua_event_handler); + mwi_subscribe(ua); } } @@ -131,9 +131,9 @@ static void tmr_handler(void *arg) struct ua *ua = le->data; struct account *acc = ua_account(ua); if (account_regint(acc) > 0) - uag_event_register(ua_event_handler, ua); + uag_event_register(ua_event_handler, ua); else - mwi_subscribe(ua); + mwi_subscribe(ua); } } diff --git a/src/ua.c b/src/ua.c index 65ffd61..b7cf132 100644 --- a/src/ua.c +++ b/src/ua.c @@ -1484,7 +1484,7 @@ const char *ua_cuser(const struct ua *ua) */ struct account *ua_account(const struct ua *ua) { - return ua->acc; + return ua ? ua->acc : NULL; } -- cgit v1.2.3