aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btmesh.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-09-18 10:09:31 -0700
committerPeter Wu <peter@lekensteyn.nl>2018-09-19 16:07:03 +0000
commit8f08a4e74ea8aa56284e6035017adf1c423c4f09 (patch)
tree030955437d3e8b2a2b5ebdcb3e0f9ba77ab42ef9 /epan/dissectors/packet-btmesh.c
parentca8304249ee986f947b30eaea1d830207165c65e (diff)
Try to discourage the use of APIs via counting.
Add the ability to specify maximum function counts for each group to checkAPIs. Add maximum counts for the "termoutput" and "abort" groups where needed. Show summaries in various checkAPI targets. Switch uses of ws_g_warning back to plain g_warning. Change-Id: I5cbddc8c671729e424eed8551f69116d16491976 Reviewed-on: https://code.wireshark.org/review/29721 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-btmesh.c')
-rw-r--r--epan/dissectors/packet-btmesh.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-btmesh.c b/epan/dissectors/packet-btmesh.c
index 14583ee70e..0d97dc9e02 100644
--- a/epan/dissectors/packet-btmesh.c
+++ b/epan/dissectors/packet-btmesh.c
@@ -16,7 +16,6 @@
#include <epan/packet.h>
#include <epan/prefs.h>
-#include <wsutil/ws_printf.h> /* ws_g_warning */
#include <wsutil/wsgcrypt.h>
#include <epan/expert.h>
#include <stdio.h>
@@ -787,7 +786,7 @@ dissect_btmesh_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
cry_error = gcry_cipher_setkey(cipher_hd, record->encryptionkey, 16);
if (cry_error) {
- ws_g_warning("gcry_cipher_setkey failed\n");
+ g_warning("gcry_cipher_setkey failed\n");
gcry_cipher_close(cipher_hd);
return offset;
}
@@ -795,7 +794,7 @@ dissect_btmesh_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
/* Load nonce */
cry_error = gcry_cipher_setiv(cipher_hd, &networknonce, 13);
if (cry_error) {
- ws_g_warning("gcry_cipher_setiv failed\n");
+ g_warning("gcry_cipher_setiv failed\n");
gcry_cipher_close(cipher_hd);
return offset;
}
@@ -807,7 +806,7 @@ dissect_btmesh_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
cry_error = gcry_cipher_ctl(cipher_hd, GCRYCTL_SET_CCM_LENGTHS, ccm_lengths, sizeof(ccm_lengths));
if (cry_error) {
- ws_g_warning("gcry_cipher_ctl failed %s enc_data_len %u\n",
+ g_warning("gcry_cipher_ctl failed %s enc_data_len %u\n",
gcry_strerror(cry_error),
enc_data_len);
gcry_cipher_close(cipher_hd);
@@ -819,7 +818,7 @@ dissect_btmesh_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
cry_error = gcry_cipher_decrypt(cipher_hd, decrypted_data, enc_data_len, tvb_get_ptr(tvb, enc_offset, enc_data_len), enc_data_len);
if (cry_error) {
expert_add_info(pinfo, item, &ei_btmesh_decrypt_failed);
- ws_g_warning("gcry_cipher_decrypt failed %s\n", gcry_strerror(cry_error));
+ g_warning("gcry_cipher_decrypt failed %s\n", gcry_strerror(cry_error));
gcry_cipher_close(cipher_hd);
return offset;
}