From 0d0578b625e2a37c8fdfab88542e5a58c22a776c Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 16 Jan 2017 00:07:17 +0000 Subject: [PATCH 1/2] Fix compile --- src/event/client_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event/client_events.c b/src/event/client_events.c index d2dc29c6..3ef193b1 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -99,12 +99,12 @@ void cl_ev_presence_send(const resource_presence_t presence_type, const int idle_secs) { char *signed_status = NULL; - char *msg = connection_get_presence_msg(); #ifdef HAVE_LIBGPGME char *account_name = session_get_account_name(); ProfAccount *account = accounts_get_account(account_name); if (account->pgp_keyid) { + char *msg = connection_get_presence_msg(); signed_status = p_gpg_sign(msg, account->pgp_keyid); } account_free(account); From 70e831e08b803fe894296fc1f6b0f4157198a833 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 16 Jan 2017 00:21:57 +0000 Subject: [PATCH 2/2] Fix tests --- tests/unittests/test_cmd_account.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unittests/test_cmd_account.c b/tests/unittests/test_cmd_account.c index 9e7ae197..a1fff9b9 100644 --- a/tests/unittests/test_cmd_account.c +++ b/tests/unittests/test_cmd_account.c @@ -806,7 +806,6 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese expect_any(accounts_get_account, name); will_return(accounts_get_account, account); #endif - will_return(connection_get_presence_msg, "Free to chat"); expect_value(presence_send, status, RESOURCE_ONLINE); expect_value(presence_send, idle, 0); expect_value(presence_send, signed_status, NULL);