Changeset 252fe2042c91270b8c1e3666cca3fa9410d7954c
- Timestamp:
- 08/30/10 01:58:02 (3 years ago)
- Author:
- Nedko Arnaudov <nedko@…>
- Children:
- dd822c7476d99ae99aae0264ab774609ed0ef896
- Parents:
- ac1de1cc6ac4cf9a23690ce7da836191ef3bb9c4
- git-committer:
- Nedko Arnaudov <nedko@arnaudov.name> / 2010-08-30T01:58:02Z+0300
- Message:
-
daemon: easier enable of find port by uuid debug logs
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r76a8b61
|
r252fe20
|
|
| 102 | 102 | } |
| 103 | 103 | |
| | 104 | //#define LOG_PORT_LOOKUP |
| | 105 | |
| 104 | 106 | static struct ladish_graph_port * |
| 105 | 107 | ladish_graph_find_port_by_uuid_internal( |
| … |
… |
|
| 111 | 113 | struct ladish_graph_port * port_ptr; |
| 112 | 114 | uuid_t current_uuid; |
| 113 | | /* char uuid1_str[37]; */ |
| 114 | | /* char uuid2_str[37]; */ |
| 115 | | |
| 116 | | /* log_info("searching by uuid for port in graph %s", ladish_graph_get_description((ladish_graph_handle)graph_ptr)); */ |
| 117 | | /* uuid_unparse(uuid, uuid1_str); */ |
| | 115 | #if defined(LOG_PORT_LOOKUP) |
| | 116 | char uuid1_str[37]; |
| | 117 | char uuid2_str[37]; |
| | 118 | |
| | 119 | log_info("searching by uuid for port in graph %s", ladish_graph_get_description((ladish_graph_handle)graph_ptr)); |
| | 120 | uuid_unparse(uuid, uuid1_str); |
| | 121 | #endif |
| 118 | 122 | |
| 119 | 123 | list_for_each(node_ptr, &graph_ptr->ports) |
| … |
… |
|
| 121 | 125 | port_ptr = list_entry(node_ptr, struct ladish_graph_port, siblings_graph); |
| 122 | 126 | |
| 123 | | /* if (port_ptr->link) */ |
| 124 | | /* { */ |
| 125 | | /* uuid_unparse(port_ptr->link_uuid_override, uuid2_str); */ |
| 126 | | /* log_info("comparing link uuid %s with %s", uuid2_str, uuid1_str); */ |
| 127 | | /* } */ |
| | 127 | #if defined(LOG_PORT_LOOKUP) |
| | 128 | if (port_ptr->link) |
| | 129 | { |
| | 130 | uuid_unparse(port_ptr->link_uuid_override, uuid2_str); |
| | 131 | log_info("comparing link uuid %s with %s", uuid2_str, uuid1_str); |
| | 132 | } |
| | 133 | #endif |
| 128 | 134 | |
| 129 | 135 | if (use_link_override_uuids && port_ptr->link && uuid_compare(port_ptr->link_uuid_override, uuid) == 0) |
| 130 | 136 | { |
| 131 | | /* log_info("found port %p of client '%s'", port_ptr->port, port_ptr->client_ptr->name); */ |
| | 137 | #if defined(LOG_PORT_LOOKUP) |
| | 138 | log_info("found link port %p of client '%s'", port_ptr->port, port_ptr->client_ptr->name); |
| | 139 | #endif |
| 132 | 140 | return port_ptr; |
| 133 | 141 | } |
| 134 | 142 | |
| 135 | 143 | ladish_port_get_uuid(port_ptr->port, current_uuid); |
| 136 | | /* uuid_unparse(current_uuid, uuid2_str); */ |
| 137 | | /* log_info("comparing port uuid %s with %s", uuid2_str, uuid1_str); */ |
| | 144 | #if defined(LOG_PORT_LOOKUP) |
| | 145 | uuid_unparse(current_uuid, uuid2_str); |
| | 146 | log_info("comparing port uuid %s with %s", uuid2_str, uuid1_str); |
| | 147 | #endif |
| 138 | 148 | if (uuid_compare(current_uuid, uuid) == 0) |
| 139 | 149 | { |
| | 150 | #if defined(LOG_PORT_LOOKUP) |
| | 151 | log_info("found port %p of client '%s'", port_ptr->port, port_ptr->client_ptr->name); |
| | 152 | #endif |
| 140 | 153 | return port_ptr; |
| 141 | 154 | } |