소스 검색

Fuzz: Enable mDNS testing and broadcast

Stefan Profanter 5 년 전
부모
커밋
e9a9f576b7
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      tests/fuzz/corpus_generator.c

+ 7 - 1
tests/fuzz/corpus_generator.c

@@ -45,7 +45,13 @@ static void * serverloop(void *_) {
 static void start_server(void) {
     running = true;
     server = UA_Server_new();
-    UA_ServerConfig_setDefault(UA_Server_getConfig(server));
+    UA_ServerConfig *config = UA_Server_getConfig(server);
+    UA_ServerConfig_setDefault(config);
+
+	config->applicationDescription.applicationType = UA_APPLICATIONTYPE_SERVER;
+	config->discovery.mdnsEnable = true;
+	config->discovery.mdns.mdnsServerName = UA_String_fromChars("Sample Multicast Server");
+
     UA_Server_run_startup(server);
     pthread_create(&server_thread, NULL, serverloop, NULL);
 }