From 9705e11527f668ef904d67dd122be0faaaa7b0b3 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 11:10:23 +0100 Subject: ox: standardize log output --- src/pgp/gpg.c | 67 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 549f9d3b..f58f3ffe 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -806,7 +806,7 @@ ox_gpg_public_keys(void) error = gpgme_new(&ctx); if (error) { - log_error("OX - gpgme_new failed: %s %s", gpgme_strsource(error), gpgme_strerror(error)); + log_error("OX: Failed to create gpgme context. %s %s", gpgme_strsource(error), gpgme_strerror(error)); return NULL; } @@ -894,13 +894,13 @@ p_ox_gpg_signcrypt(const char* const sender_barejid, const char* const recipient gpgme_error_t error = gpgme_new(&ctx); if (GPG_ERR_NO_ERROR != error) { - printf("gpgme_new: %d\n", error); + log_error("OX: Failed to create gpgme context. %s %s", gpgme_strsource(error), gpgme_strerror(error)); return NULL; } error = gpgme_set_protocol(ctx, GPGME_PROTOCOL_OPENPGP); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: Signcrypt error: %s", gpgme_strerror(error)); } gpgme_set_armor(ctx, 0); @@ -908,7 +908,7 @@ p_ox_gpg_signcrypt(const char* const sender_barejid, const char* const recipient gpgme_set_offline(ctx, 1); gpgme_set_keylist_mode(ctx, GPGME_KEYLIST_MODE_LOCAL); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: Signcrypt error: %s", gpgme_strerror(error)); } gpgme_key_t recp[3]; @@ -928,22 +928,23 @@ p_ox_gpg_signcrypt(const char* const sender_barejid, const char* const recipient // lookup own key recp[0] = _ox_key_lookup(sender_barejid, TRUE); if (error != 0) { - log_error("Key not found for %s. GpgME Error: %s", xmpp_jid_me, gpgme_strerror(error)); + log_error("OX: Key not found for %s. Error: %s", xmpp_jid_me, gpgme_strerror(error)); return NULL; } error = gpgme_signers_add(ctx, recp[0]); if (error != 0) { - log_error("gpgme_signers_add %s. GpgME Error: %s", xmpp_jid_me, gpgme_strerror(error)); + log_error("OX: gpgme_signers_add %s. Error: %s", xmpp_jid_me, gpgme_strerror(error)); return NULL; } // lookup key of recipient recp[1] = _ox_key_lookup(recipient_barejid, FALSE); if (error != 0) { - log_error("Key not found for %s. GpgME Error: %s", xmpp_jid_recipient, gpgme_strerror(error)); + log_error("OX: Key not found for %s. Error: %s", xmpp_jid_recipient, gpgme_strerror(error)); return NULL; } + recp[2] = NULL; log_debug("%s <%s>", recp[0]->uids->name, recp[0]->uids->email); log_debug("%s <%s>", recp[1]->uids->name, recp[1]->uids->email); @@ -955,24 +956,24 @@ p_ox_gpg_signcrypt(const char* const sender_barejid, const char* const recipient error = gpgme_data_new(&plain); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); return NULL; } error = gpgme_data_new_from_mem(&plain, message, strlen(message), 0); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); return NULL; } error = gpgme_data_new(&cipher); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); return NULL; } error = gpgme_op_encrypt_sign(ctx, recp, flags, plain, cipher); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); return NULL; } @@ -1072,7 +1073,7 @@ static gpgme_key_t _ox_key_lookup(const char* const barejid, gboolean secret_only) { g_assert(barejid); - log_debug("Looking for %s key: %s", secret_only == TRUE ? "Private" : "Public", barejid); + log_debug("OX: Looking for %s key: %s", secret_only == TRUE ? "Private" : "Public", barejid); gpgme_key_t key = NULL; gpgme_error_t error; @@ -1080,7 +1081,7 @@ _ox_key_lookup(const char* const barejid, gboolean secret_only) error = gpgme_new(&ctx); if (error) { - log_error("OX - gpgme_new failed: %s %s", gpgme_strsource(error), gpgme_strerror(error)); + log_error("OX: gpgme_new failed: %s %s", gpgme_strsource(error), gpgme_strerror(error)); return NULL; } @@ -1153,13 +1154,13 @@ p_ox_gpg_decrypt(char* base64) gpgme_error_t error = gpgme_new(&ctx); if (GPG_ERR_NO_ERROR != error) { - printf("gpgme_new: %d\n", error); + log_error("OX: gpgme_new failed: %s %s", gpgme_strsource(error), gpgme_strerror(error)); return NULL; } error = gpgme_set_protocol(ctx, GPGME_PROTOCOL_OPENPGP); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); } gpgme_set_armor(ctx, 0); @@ -1167,7 +1168,7 @@ p_ox_gpg_decrypt(char* base64) gpgme_set_offline(ctx, 1); gpgme_set_keylist_mode(ctx, GPGME_KEYLIST_MODE_LOCAL); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); } gpgme_data_t plain = NULL; @@ -1177,19 +1178,19 @@ p_ox_gpg_decrypt(char* base64) guchar* encrypted = g_base64_decode(base64, &s); error = gpgme_data_new_from_mem(&cipher, (char*)encrypted, s, 0); if (error != 0) { - log_error("GpgME Error gpgme_data_new_from_mem: %s", gpgme_strerror(error)); + log_error("OX: gpgme_data_new_from_mem: %s", gpgme_strerror(error)); return NULL; } error = gpgme_data_new(&plain); if (error != 0) { - log_error("GpgME Error: %s", gpgme_strerror(error)); + log_error("OX: %s", gpgme_strerror(error)); return NULL; } error = gpgme_op_decrypt_verify(ctx, cipher, plain); if (error != 0) { - log_error("GpgME Error gpgme_op_decrypt: %s", gpgme_strerror(error)); + log_error("OX: gpgme_op_decrypt: %s", gpgme_strerror(error)); error = gpgme_op_decrypt(ctx, cipher, plain); if (error != 0) { return NULL; @@ -1230,7 +1231,7 @@ void p_ox_gpg_readkey(const char* const filename, char** key, char** fp) { - log_info("Read OpenPGP Key from file %s", filename); + log_info("PX: Read OpenPGP Key from file %s", filename); GError* error = NULL; gchar* data = NULL; @@ -1248,13 +1249,13 @@ p_ox_gpg_readkey(const char* const filename, char** key, char** fp) gpgme_error_t error = gpgme_new(&ctx); if (GPG_ERR_NO_ERROR != error) { - log_error("Read OpenPGP key from file: gpgme_new failed: %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_new failed: %s", gpgme_strerror(error)); return; } error = gpgme_set_protocol(ctx, GPGME_PROTOCOL_OPENPGP); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: set GPGME_PROTOCOL_OPENPGP: %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: set GPGME_PROTOCOL_OPENPGP: %s", gpgme_strerror(error)); return; } @@ -1266,36 +1267,36 @@ p_ox_gpg_readkey(const char* const filename, char** key, char** fp) gpgme_data_t gpgme_data = NULL; error = gpgme_data_new(&gpgme_data); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: gpgme_data_new %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_data_new %s", gpgme_strerror(error)); return; } error = gpgme_data_new_from_mem(&gpgme_data, (char*)data, size, 0); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: gpgme_data_new_from_mem %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_data_new_from_mem %s", gpgme_strerror(error)); return; } error = gpgme_op_keylist_from_data_start(ctx, gpgme_data, 0); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: gpgme_op_keylist_from_data_start %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_op_keylist_from_data_start %s", gpgme_strerror(error)); return; } gpgme_key_t gkey; error = gpgme_op_keylist_next(ctx, &gkey); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: gpgme_op_keylist_next %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_op_keylist_next %s", gpgme_strerror(error)); return; } gpgme_key_t end; error = gpgme_op_keylist_next(ctx, &end); if (error == GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: ambiguous key"); + log_error("OX: Read OpenPGP key from file: ambiguous key"); return; } if (gkey->revoked || gkey->expired || gkey->disabled || gkey->invalid || gkey->secret) { - log_error("Read OpenPGP key from file: Key is not valid"); + log_error("OX: Read OpenPGP key from file: Key is not valid"); return; } @@ -1304,7 +1305,7 @@ p_ox_gpg_readkey(const char* const filename, char** key, char** fp) *key = strdup(keybase64); *fp = strdup(gkey->fpr); } else { - log_error("Read OpenPGP key from file: Unable to read file: %s", error->message); + log_error("OX: Read OpenPGP key from file: Unable to read file: %s", error->message); } } @@ -1321,13 +1322,13 @@ p_ox_gpg_import(char* base64_public_key) gpgme_error_t error = gpgme_new(&ctx); if (GPG_ERR_NO_ERROR != error) { - log_error("Read OpenPGP key from file: gpgme_new failed: %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_new failed: %s", gpgme_strerror(error)); return FALSE; } error = gpgme_set_protocol(ctx, GPGME_PROTOCOL_OPENPGP); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: set GPGME_PROTOCOL_OPENPGP: %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: set GPGME_PROTOCOL_OPENPGP: %s", gpgme_strerror(error)); return FALSE; } @@ -1339,14 +1340,14 @@ p_ox_gpg_import(char* base64_public_key) gpgme_data_t gpgme_data = NULL; error = gpgme_data_new(&gpgme_data); if (error != GPG_ERR_NO_ERROR) { - log_error("Read OpenPGP key from file: gpgme_data_new %s", gpgme_strerror(error)); + log_error("OX: Read OpenPGP key from file: gpgme_data_new %s", gpgme_strerror(error)); return FALSE; } gpgme_data_new_from_mem(&gpgme_data, (gchar*)key, size, 0); error = gpgme_op_import(ctx, gpgme_data); if (error != GPG_ERR_NO_ERROR) { - log_error("Failed to import key"); + log_error("OX: Failed to import key"); } return TRUE; -- cgit 1.4.1-2-gfad0 From 423105085a90e706f34f9b4b2fb75169246bc71e Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 11:11:49 +0100 Subject: ox: adjust formatting --- src/pgp/gpg.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index f58f3ffe..a56b34e3 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -1133,8 +1133,6 @@ _ox_key_is_usable(gpgme_key_t key, const char* const barejid, gboolean secret) /*! * @brief XMPP-OX: Decrypt OX Message. * - * - * * @param base64 base64_encode OpenPGP message. * * @result decrypt XMPP OX Message NULL terminated C-String @@ -1226,11 +1224,9 @@ p_ox_gpg_decrypt(char* base64) * \param fp result with the fingerprint or NULL * */ - void p_ox_gpg_readkey(const char* const filename, char** key, char** fp) { - log_info("PX: Read OpenPGP Key from file %s", filename); GError* error = NULL; -- cgit 1.4.1-2-gfad0 From 144742cb701084cf143b7d996e05e3b3e5449758 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 11:41:53 +0100 Subject: ox: add autocomplete for /ox announce --- src/command/cmd_ac.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 81597a2d..6d5c67db 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -2589,6 +2589,10 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous) return found; } + if (strncmp(input, "/ox announce ", 13) == 0) { + return cmd_ac_complete_filepath(input, "/ox announce", previous); + } + gboolean result; gchar** args = parse_args(input, 2, 3, &result); if ((strncmp(input, "/ox", 4) == 0) && (result == TRUE)) { -- cgit 1.4.1-2-gfad0 From 8173878bc7ce5b502a967186f847c8f7cf33ed72 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 11:49:33 +0100 Subject: ox: remove else case --- src/xmpp/ox.c | 87 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 44 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/xmpp/ox.c b/src/xmpp/ox.c index c4efa5d6..012a4017 100644 --- a/src/xmpp/ox.c +++ b/src/xmpp/ox.c @@ -102,50 +102,51 @@ ox_announce_public_key(const char* const filename) if (!(key && fp)) { cons_show("Error during OpenPGP OX announce. See log file for more information"); return FALSE; - } else { - log_info("[OX] Annonuce OpenPGP Key for Fingerprint: %s", fp); - xmpp_ctx_t* const ctx = connection_get_ctx(); - char* id = xmpp_uuid_gen(ctx); - xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id); - xmpp_stanza_set_from(iq, xmpp_conn_get_jid(connection_get_conn())); - - xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx); - xmpp_stanza_set_name(pubsub, STANZA_NAME_PUBSUB); - xmpp_stanza_set_ns(pubsub, XMPP_FEATURE_PUBSUB); - - GString* node_name = g_string_new(STANZA_NS_OPENPGP_0_PUBLIC_KEYS); - g_string_append(node_name, ":"); - g_string_append(node_name, fp); - - xmpp_stanza_t* publish = xmpp_stanza_new(ctx); - xmpp_stanza_set_name(publish, STANZA_NAME_PUBLISH); - xmpp_stanza_set_attribute(publish, STANZA_ATTR_NODE, node_name->str); - - xmpp_stanza_t* item = xmpp_stanza_new(ctx); - xmpp_stanza_set_name(item, STANZA_NAME_ITEM); - char* timestamp = _gettimestamp(); - xmpp_stanza_set_attribute(item, STANZA_ATTR_ID, timestamp); - free(timestamp); - - xmpp_stanza_t* pubkey = xmpp_stanza_new(ctx); - xmpp_stanza_set_name(pubkey, STANZA_NAME_PUPKEY); - xmpp_stanza_set_ns(pubkey, STANZA_NS_OPENPGP_0); - - xmpp_stanza_t* data = xmpp_stanza_new(ctx); - xmpp_stanza_set_name(data, STANZA_NAME_DATA); - xmpp_stanza_t* keydata = xmpp_stanza_new(ctx); - xmpp_stanza_set_text(keydata, key); - - xmpp_stanza_add_child(data, keydata); - xmpp_stanza_add_child(pubkey, data); - xmpp_stanza_add_child(item, pubkey); - xmpp_stanza_add_child(publish, item); - xmpp_stanza_add_child(pubsub, publish); - xmpp_stanza_add_child(iq, pubsub); - xmpp_send(connection_get_conn(), iq); - - _ox_metadata_node__public_key(fp); } + + log_info("[OX] Annonuce OpenPGP Key for Fingerprint: %s", fp); + xmpp_ctx_t* const ctx = connection_get_ctx(); + char* id = xmpp_uuid_gen(ctx); + xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id); + xmpp_stanza_set_from(iq, xmpp_conn_get_jid(connection_get_conn())); + + xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(pubsub, STANZA_NAME_PUBSUB); + xmpp_stanza_set_ns(pubsub, XMPP_FEATURE_PUBSUB); + + GString* node_name = g_string_new(STANZA_NS_OPENPGP_0_PUBLIC_KEYS); + g_string_append(node_name, ":"); + g_string_append(node_name, fp); + + xmpp_stanza_t* publish = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(publish, STANZA_NAME_PUBLISH); + xmpp_stanza_set_attribute(publish, STANZA_ATTR_NODE, node_name->str); + + xmpp_stanza_t* item = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(item, STANZA_NAME_ITEM); + char* timestamp = _gettimestamp(); + xmpp_stanza_set_attribute(item, STANZA_ATTR_ID, timestamp); + free(timestamp); + + xmpp_stanza_t* pubkey = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(pubkey, STANZA_NAME_PUPKEY); + xmpp_stanza_set_ns(pubkey, STANZA_NS_OPENPGP_0); + + xmpp_stanza_t* data = xmpp_stanza_new(ctx); + xmpp_stanza_set_name(data, STANZA_NAME_DATA); + xmpp_stanza_t* keydata = xmpp_stanza_new(ctx); + xmpp_stanza_set_text(keydata, key); + + xmpp_stanza_add_child(data, keydata); + xmpp_stanza_add_child(pubkey, data); + xmpp_stanza_add_child(item, pubkey); + xmpp_stanza_add_child(publish, item); + xmpp_stanza_add_child(pubsub, publish); + xmpp_stanza_add_child(iq, pubsub); + xmpp_send(connection_get_conn(), iq); + + _ox_metadata_node__public_key(fp); + return TRUE; } -- cgit 1.4.1-2-gfad0 From 6d17b36605292a0eda148178677f72819c80b6fe Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 11:57:25 +0100 Subject: ox: expand file and check for existance before trying to announce Output before: ``` 11:00:00 - Annonuce OpenPGP Key for OX ~/test/testuser.pub.gpg ... ``` After: ``` 11:00:00 - Annonuce OpenPGP Key for OX /home/user/test/testuser.pub.gpg ... ``` Now we expand the path so that we can check for `~` properly. And test if the file is actually a normal file. --- src/command/cmd_funcs.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 4b79b145..0219b61f 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -7613,7 +7613,22 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args) return TRUE; } else if (g_strcmp0(args[0], "announce") == 0) { if (args[1]) { - ox_announce_public_key(args[1]); + gchar* filename = get_expanded_path(args[1]); + + if (access(filename, R_OK) != 0) { + cons_show_error("File not found: %s", filename); + g_free(filename); + return TRUE; + } + + if (!is_regular_file(filename)) { + cons_show_error("Not a file: %s", filename); + g_free(filename); + return TRUE; + } + + ox_announce_public_key(filename); + free(filename); } else { cons_show("Filename is required"); } -- cgit 1.4.1-2-gfad0 From 62eedb1cd592e18a3bf6ac185ae86257233a12cc Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 24 Feb 2022 12:02:13 +0100 Subject: Fix memleak in cmd_export --- src/command/cmd_funcs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 0219b61f..be469c28 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -1101,6 +1101,7 @@ cmd_export(ProfWin* window, const char* const command, gchar** args) char* path = get_expanded_path(args[0]); fd = open(path, O_WRONLY | O_CREAT, 00600); + free(path); if (-1 == fd) { cons_show("error: cannot open %s: %s", args[0], strerror(errno)); -- cgit 1.4.1-2-gfad0 From a086d3cd16a39ace45fac46763811081293207de Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 25 Feb 2022 20:07:47 +0100 Subject: Remove useless comment --- src/command/cmd_ac.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 6d5c67db..da961aae 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -2553,11 +2553,6 @@ _pgp_autocomplete(ProfWin* window, const char* const input, gboolean previous) return NULL; } -/*! - * \brief Auto completion for XEP-0373: OpenPGP for XMPP command. - * - * - */ static char* _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous) { -- cgit 1.4.1-2-gfad0 From cdb8383260ce132e1b4784841727a4b210688b91 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 25 Feb 2022 20:09:09 +0100 Subject: Remove strange block from ox autocomplete Not sure what this should do. Can't see what kind of key we want to complete here. `/ox help` also doesn't list anything that needs a key. --- src/command/cmd_ac.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src') diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index da961aae..9635211d 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -2588,24 +2588,6 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous) return cmd_ac_complete_filepath(input, "/ox announce", previous); } - gboolean result; - gchar** args = parse_args(input, 2, 3, &result); - if ((strncmp(input, "/ox", 4) == 0) && (result == TRUE)) { - GString* beginning = g_string_new("/ox "); - g_string_append(beginning, args[0]); - if (args[1]) { - g_string_append(beginning, " "); - g_string_append(beginning, args[1]); - } - found = autocomplete_param_with_func(input, beginning->str, p_gpg_autocomplete_key, previous, NULL); - g_string_free(beginning, TRUE); - if (found) { - g_strfreev(args); - return found; - } - } - g_strfreev(args); - if (conn_status == JABBER_CONNECTED) { found = autocomplete_param_with_func(input, "/ox setkey", roster_barejid_autocomplete, previous, NULL); if (found) { -- cgit 1.4.1-2-gfad0