| | |
| | | } |
| | | |
| | | string msg(mtl2.SerializeAsString()); |
| | | |
| | | return simple_request(get_url(URLRegTopic), msg.data(), msg.size(), reply, reply_len, timeout_ms); |
| | | const auto& url = get_url(URLRegTopic); |
| | | if (url.empty()) { |
| | | set_last_error("bus_register_topics url empty"); |
| | | return false; |
| | | } |
| | | return simple_request(url, msg.data(), msg.size(), reply, reply_len, timeout_ms); |
| | | } |
| | | |
| | | int bus_query_topic_address(void* handle, const void *remote, |
| | |
| | | } |
| | | |
| | | auto url(get_url(URLQueryTopic)); |
| | | if (url.empty()) { |
| | | set_last_error("bus_query_topic_address url empty"); |
| | | return false; |
| | | } |
| | | |
| | | // if (remote && remote_len > 0){ |
| | | // BHAddress addr; |
| | |
| | | } |
| | | |
| | | auto url(get_url(URLQueryProcs)); |
| | | |
| | | if (url.empty()) { |
| | | set_last_error("bus_query_procs url empty"); |
| | | return false; |
| | | } |
| | | // if (remote && remote_len > 0){ |
| | | // BHAddress addr; |
| | | // if (addr.ParseFromArray(remote, remote_len)){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (url.empty()) { |
| | | set_last_error("bus_request url empty"); |
| | | return false; |
| | | } |
| | | int rc = request2(url, request, request_len, reply, reply_len, timeout_ms); |
| | | if (rc < 0) return false; |
| | | copy_memory(proc_id, proc_id_len, procid.data(), procid.size()); |