about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-18 20:34:46 +0000
committerJames Booth <boothj5@gmail.com>2014-01-18 20:34:46 +0000
commit39e0782da8a45a40df280eda5abf9051a575a9fa (patch)
tree8c3b2dad8cbb56a8f13795bf64010b7d96d8bea5
parente7013408e5640cd41524a17c6f8f112eef1b54da (diff)
downloadprofani-tty-39e0782da8a45a40df280eda5abf9051a575a9fa.tar.gz
Fixed test compilation
-rw-r--r--src/config/accounts.c2
-rw-r--r--src/config/accounts.h2
-rw-r--r--src/xmpp/connection.c2
-rw-r--r--src/xmpp/xmpp.h2
-rw-r--r--tests/config/mock_accounts.c4
-rw-r--r--tests/xmpp/mock_xmpp.c3
6 files changed, 8 insertions, 7 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c
index 178f726f..6a1ade68 100644
--- a/src/config/accounts.c
+++ b/src/config/accounts.c
@@ -119,7 +119,7 @@ _accounts_reset_enabled_search(void)
 }
 
 static void
-_accounts_add(const char *account_name, const char *altdomain, int port)
+_accounts_add(const char *account_name, const char *altdomain, const int port)
 {
     // set account name and resource
     const char *barejid = account_name;
diff --git a/src/config/accounts.h b/src/config/accounts.h
index 8f7b5c37..74345f0c 100644
--- a/src/config/accounts.h
+++ b/src/config/accounts.h
@@ -56,7 +56,7 @@ char * (*accounts_find_all)(char *prefix);
 char * (*accounts_find_enabled)(char *prefix);
 void (*accounts_reset_all_search)(void);
 void (*accounts_reset_enabled_search)(void);
-void (*accounts_add)(const char *jid, const char *altdomain, int port);
+void (*accounts_add)(const char *jid, const char *altdomain, const int port);
 gchar** (*accounts_get_list)(void);
 ProfAccount* (*accounts_get_account)(const char * const name);
 void (*accounts_free_account)(ProfAccount *account);
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index dc015dd6..2bf5a304 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -132,7 +132,7 @@ _jabber_connect_with_account(const ProfAccount * const account)
 
 static jabber_conn_status_t
 _jabber_connect_with_details(const char * const jid,
-    const char * const passwd, const char * const altdomain, int port)
+    const char * const passwd, const char * const altdomain, const int port)
 {
     assert(jid != NULL);
     assert(passwd != NULL);
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 86f585e4..5a331b04 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -85,7 +85,7 @@ void roster_init_module(void);
 // connection functions
 void (*jabber_init)(const int disable_tls);
 jabber_conn_status_t (*jabber_connect_with_details)(const char * const jid,
-    const char * const passwd, const char * const altdomain, int port);
+    const char * const passwd, const char * const altdomain, const int port);
 jabber_conn_status_t (*jabber_connect_with_account)(const ProfAccount * const account);
 void (*jabber_disconnect)(void);
 void (*jabber_shutdown)(void);
diff --git a/tests/config/mock_accounts.c b/tests/config/mock_accounts.c
index db2e0fd5..1f145125 100644
--- a/tests/config/mock_accounts.c
+++ b/tests/config/mock_accounts.c
@@ -62,14 +62,14 @@ _mock_accounts_get_list(void)
 }
 
 void
-_mock_accounts_add(const char *account_name, const char *altdomain)
+_mock_accounts_add(const char *account_name, const char *altdomain, const int port)
 {
     check_expected(account_name);
     check_expected(altdomain);    
 }
 
 void
-_stub_accounts_add(const char *account_name, const char *altdomain)
+_stub_accounts_add(const char *account_name, const char *altdomain, const int port)
 {
     // do nothing
 }
diff --git a/tests/xmpp/mock_xmpp.c b/tests/xmpp/mock_xmpp.c
index 70bcbc3b..c569d67f 100644
--- a/tests/xmpp/mock_xmpp.c
+++ b/tests/xmpp/mock_xmpp.c
@@ -28,11 +28,12 @@ _mock_iq_room_list_request(gchar *conf_server)
 
 static jabber_conn_status_t
 _mock_jabber_connect_with_details(const char * const jid,
-    const char * const passwd, const char * const altdomain)
+    const char * const passwd, const char * const altdomain, const int port)
 {
     check_expected(jid);
     check_expected(passwd);
     check_expected(altdomain);
+    check_expected(port);
     return (jabber_conn_status_t)mock();
 }