Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: src/pkg/mdns/mdns_extension.cc

Issue 1416833009: Add multiple results and timeout handling to the Mac OS mDNS native extension (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pkg/mdns/mdns_extension.cc
diff --git a/src/pkg/mdns/mdns_extension.cc b/src/pkg/mdns/mdns_extension.cc
index d6818de5e0c871dd8c7171f6f5e3fa103a9fb545..cb0888f4238269f1c163593d12f9ca5171079b53 100644
--- a/src/pkg/mdns/mdns_extension.cc
+++ b/src/pkg/mdns/mdns_extension.cc
@@ -33,14 +33,17 @@ void HandleRequest(Dart_Port port_id, Dart_CObject* message) {
}
case kLookupRequest:
- if (message->value.as_array.length == 4) {
+ if (message->value.as_array.length == 5) {
Dart_CObject* type = message->value.as_array.values[2];
Dart_CObject* name = message->value.as_array.values[3];
+ Dart_CObject* timeout = message->value.as_array.values[4];
if (type->type == Dart_CObject_kInt32 &&
- name->type == Dart_CObject_kString) {
+ name->type == Dart_CObject_kString &&
+ timeout->type == Dart_CObject_kInt32) {
HandleLookup(reply_port->value.as_send_port.id,
type->value.as_int32,
- name->value.as_string);
+ name->value.as_string,
+ timeout->value.as_int32);
}
return;
}

Powered by Google App Engine
This is Rietveld 408576698