Переглянути джерело

Fix #1152: Change BadNotFound to BadNothingToDo

Stefan Profanter 7 роки тому
батько
коміт
8b36fb49fc

+ 1 - 1
src/server/ua_services_discovery.c

@@ -429,7 +429,7 @@ process_RegisterServer(UA_Server *server, UA_Session *session,
             UA_LOG_WARNING_SESSION(server->config.logger, session,
                                    "Could not unregister server %.*s. Not registered.",
                                    (int)requestServer->serverUri.length, requestServer->serverUri.data);
-            responseHeader->serviceResult = UA_STATUSCODE_BADNOTFOUND;
+            responseHeader->serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
             return;
         }
 

+ 2 - 2
src/server/ua_services_discovery_multicast.c

@@ -532,7 +532,7 @@ UA_Discovery_removeRecord(UA_Server *server, const UA_String *servername,
         UA_LOG_WARNING(server->config.logger, UA_LOGCATEGORY_SERVER,
                        "Multicast DNS: could not remove record. "
                        "PTR Record not found for domain: %s", fullServiceDomain);
-        return UA_STATUSCODE_BADNOTFOUND;
+        return UA_STATUSCODE_BADNOTHINGTODO;
     }
     mdnsd_done(server->mdnsDaemon, r);
 
@@ -544,7 +544,7 @@ UA_Discovery_removeRecord(UA_Server *server, const UA_String *servername,
         UA_LOG_WARNING(server->config.logger, UA_LOGCATEGORY_SERVER,
                        "Multicast DNS: could not remove record. Record not "
                        "found for domain: %s", fullServiceDomain);
-        return UA_STATUSCODE_BADNOTFOUND;
+        return UA_STATUSCODE_BADNOTHINGTODO;
     }
 
     while(r2) {