get_all_node_records(): display any error encountered and return success status

In many cases we'll want to bail out with an error if the node list can't
be retrieved for any reason. This saves some repetitive coding.
This commit is contained in:
Ian Barwick
2018-06-26 10:44:31 +09:00
parent bb4fdcda98
commit b0a2ee2259
6 changed files with 41 additions and 18 deletions

View File

@@ -421,7 +421,7 @@ t_node_info *get_node_record_pointer(PGconn *conn, int node_id);
bool get_local_node_record(PGconn *conn, int node_id, t_node_info *node_info);
bool get_primary_node_record(PGconn *conn, t_node_info *node_info);
void get_all_node_records(PGconn *conn, NodeInfoList *node_list);
bool get_all_node_records(PGconn *conn, NodeInfoList *node_list);
void get_downstream_node_records(PGconn *conn, int node_id, NodeInfoList *nodes);
void get_active_sibling_node_records(PGconn *conn, int node_id, int upstream_node_id, NodeInfoList *node_list);
void get_node_records_by_priority(PGconn *conn, NodeInfoList *node_list);