summaryrefslogtreecommitdiffstats
path: root/ui/common/discover-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/common/discover-client.c')
-rw-r--r--ui/common/discover-client.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c
index a565be8..14f36da 100644
--- a/ui/common/discover-client.c
+++ b/ui/common/discover-client.c
@@ -383,3 +383,21 @@ int discover_client_send_config(struct discover_client *client,
return pb_protocol_write_message(client->fd, message);
}
+
+int discover_client_send_url(struct discover_client *client,
+ char *url)
+{
+ struct pb_protocol_message *message;
+ int len;
+
+ len = pb_protocol_url_len(url);
+
+ message = pb_protocol_create_message(client,
+ PB_PROTOCOL_ACTION_ADD_URL, len);
+ if (!message)
+ return -1;
+
+ pb_protocol_serialise_url(url, message->payload, len);
+
+ return pb_protocol_write_message(client->fd, message);
+}
OpenPOWER on IntegriCloud