X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fovs_stats.c;h=20b0dd1f0174fbd31104f837c82572f339bc4843;hb=e746ad785774de37a30302fef65f1c4aaf8698ab;hp=31af77c841d9543d8b7f34fa4e86a2baf0f17802;hpb=5ff74d56067ac64db801df5184eb8b97f4b2b645;p=collectd.git diff --git a/src/ovs_stats.c b/src/ovs_stats.c index 31af77c8..20b0dd1f 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -3,14 +3,17 @@ * * Copyright(c) 2016 Intel Corporation. All rights reserved. * - * Permission is hereby granted, free of charge, to any person obtaining a copy of + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do + * of the Software, and to permit persons to whom the Software is furnished to + * do * so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all + * The above copyright notice and this permission notice shall be included in + * all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -711,33 +714,30 @@ static void ovs_stats_initialize(ovs_db_t *pdb) { "external_ids", NULL}; /* subscribe to a tables */ - ovs_db_table_cb_register(pdb, "Bridge", bridge_columns, - ovs_stats_bridge_table_change_cb, + ovs_db_table_cb_register( + pdb, "Bridge", bridge_columns, ovs_stats_bridge_table_change_cb, ovs_stats_bridge_table_result_cb, - OVS_DB_TABLE_CB_FLAG_INITIAL | - OVS_DB_TABLE_CB_FLAG_INSERT | + OVS_DB_TABLE_CB_FLAG_INITIAL | OVS_DB_TABLE_CB_FLAG_INSERT | OVS_DB_TABLE_CB_FLAG_MODIFY); ovs_db_table_cb_register(pdb, "Bridge", bridge_columns, ovs_stats_bridge_table_delete_cb, NULL, OVS_DB_TABLE_CB_FLAG_DELETE); - ovs_db_table_cb_register(pdb, "Port", port_columns, - ovs_stats_port_table_change_cb, + ovs_db_table_cb_register( + pdb, "Port", port_columns, ovs_stats_port_table_change_cb, ovs_stats_port_table_result_cb, - OVS_DB_TABLE_CB_FLAG_INITIAL | - OVS_DB_TABLE_CB_FLAG_INSERT | + OVS_DB_TABLE_CB_FLAG_INITIAL | OVS_DB_TABLE_CB_FLAG_INSERT | OVS_DB_TABLE_CB_FLAG_MODIFY); ovs_db_table_cb_register(pdb, "Port", port_columns, ovs_stats_port_table_delete_cb, NULL, OVS_DB_TABLE_CB_FLAG_DELETE); - ovs_db_table_cb_register(pdb, "Interface", interface_columns, - ovs_stats_interface_table_change_cb, + ovs_db_table_cb_register( + pdb, "Interface", interface_columns, ovs_stats_interface_table_change_cb, ovs_stats_interface_table_result_cb, - OVS_DB_TABLE_CB_FLAG_INITIAL | - OVS_DB_TABLE_CB_FLAG_INSERT | + OVS_DB_TABLE_CB_FLAG_INITIAL | OVS_DB_TABLE_CB_FLAG_INSERT | OVS_DB_TABLE_CB_FLAG_MODIFY); } @@ -862,8 +862,8 @@ static int ovs_stats_plugin_init(void) { plugin_name, ovs_stats_cfg.ovs_db_node, ovs_stats_cfg.ovs_db_serv, ovs_stats_cfg.ovs_db_unix); /* connect to OvS DB */ - if ((g_ovs_db = ovs_db_init (ovs_stats_cfg.ovs_db_node, - ovs_stats_cfg.ovs_db_serv, + if ((g_ovs_db = + ovs_db_init(ovs_stats_cfg.ovs_db_node, ovs_stats_cfg.ovs_db_serv, ovs_stats_cfg.ovs_db_unix, &cb)) == NULL) { ERROR("%s: plugin: failed to connect to OvS DB server", plugin_name); return -1;