Forráskód Böngészése

cosmetic: clean overlong lines in the client

Julius Pfrommer 8 éve
szülő
commit
1b301f0e79

+ 52 - 33
src/client/ua_client.c

@@ -105,7 +105,8 @@ static UA_StatusCode HelAckHandshake(UA_Client *client) {
     /* Get a buffer */
     UA_ByteString message;
     UA_StatusCode retval =
-        client->connection->getSendBuffer(client->connection, UA_MINMESSAGESIZE, &message);
+        client->connection->getSendBuffer(client->connection,
+                                          UA_MINMESSAGESIZE, &message);
     if(retval != UA_STATUSCODE_GOOD)
         return retval;
 
@@ -137,10 +138,12 @@ static UA_StatusCode HelAckHandshake(UA_Client *client) {
     message.length = messageHeader.messageSize;
     retval = client->connection->send(client->connection, &message);
     if(retval != UA_STATUSCODE_GOOD) {
-        UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK, "Sending HEL failed");
+        UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK,
+                    "Sending HEL failed");
         return retval;
     }
-    UA_LOG_DEBUG(client->config.logger, UA_LOGCATEGORY_NETWORK, "Sent HEL message");
+    UA_LOG_DEBUG(client->config.logger, UA_LOGCATEGORY_NETWORK,
+                 "Sent HEL message");
 
     /* Loop until we have a complete chunk */
     /* TODO: quit after a total wait time of client->config.timeout */
@@ -150,7 +153,8 @@ static UA_StatusCode HelAckHandshake(UA_Client *client) {
         retval = client->connection->recv(client->connection, &reply, client->config.timeout);
         retval |= UA_Connection_completeMessages(client->connection, &reply, &realloced);
         if(retval != UA_STATUSCODE_GOOD) {
-            UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK, "Receiving ACK message failed");
+            UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK,
+                        "Receiving ACK message failed");
             return retval;
         }
     } while(reply.length == 0);
@@ -167,9 +171,11 @@ static UA_StatusCode HelAckHandshake(UA_Client *client) {
     else
         UA_ByteString_deleteMembers(&reply);
 
-    /* Store remote connection settings and adjust local configuration to not exceed the limits */
+    /* Store remote connection settings and adjust local configuration to not
+       exceed the limits */
     if(retval == UA_STATUSCODE_GOOD) {
-        UA_LOG_DEBUG(client->config.logger, UA_LOGCATEGORY_NETWORK, "Received ACK message");
+        UA_LOG_DEBUG(client->config.logger, UA_LOGCATEGORY_NETWORK,
+                     "Received ACK message");
         conn->remoteConf.maxChunkCount = ackMessage.maxChunkCount; /* may be zero -> unlimited */
         conn->remoteConf.maxMessageSize = ackMessage.maxMessageSize; /* may be zero -> unlimited */
         conn->remoteConf.protocolVersion = ackMessage.protocolVersion;
@@ -181,7 +187,8 @@ static UA_StatusCode HelAckHandshake(UA_Client *client) {
             conn->localConf.recvBufferSize = conn->remoteConf.sendBufferSize;
         conn->state = UA_CONNECTION_ESTABLISHED;
     } else {
-        UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK, "Decoding ACK message failed");
+        UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_NETWORK,
+                    "Decoding ACK message failed");
     }
     UA_TcpAcknowledgeMessage_deleteMembers(&ackMessage);
 
@@ -388,10 +395,7 @@ static UA_StatusCode ActivateSession(UA_Client *client) {
     return retval;
 }
 
-/**
- * Gets a list of endpoints
- * Memory is allocated for endpointDescription array
- */
+/* Gets a list of endpoints. Memory is allocated for endpointDescription array */
 static UA_StatusCode
 GetEndpoints(UA_Client *client, size_t* endpointDescriptionsSize,
              UA_EndpointDescription** endpointDescriptions) {
@@ -432,7 +436,8 @@ static UA_StatusCode EndpointsHandshake(UA_Client *client) {
     UA_Boolean endpointFound = false;
     UA_Boolean tokenFound = false;
     UA_String securityNone = UA_STRING("http://opcfoundation.org/UA/SecurityPolicy#None");
-    UA_String binaryTransport = UA_STRING("http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary");
+    UA_String binaryTransport = UA_STRING("http://opcfoundation.org/UA-Profile/"
+                                          "Transport/uatcp-uasc-uabinary");
 
     //TODO: compare endpoint information with client->endpointUri
     for(size_t i = 0; i < endpointArraySize; i++) {
@@ -465,14 +470,17 @@ static UA_StatusCode EndpointsHandshake(UA_Client *client) {
         }
     }
 
-    UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
+    UA_Array_delete(endpointArray, endpointArraySize,
+                    &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
 
     if(!endpointFound) {
-        UA_LOG_ERROR(client->config.logger, UA_LOGCATEGORY_CLIENT, "No suitable endpoint found");
+        UA_LOG_ERROR(client->config.logger, UA_LOGCATEGORY_CLIENT,
+                     "No suitable endpoint found");
         return UA_STATUSCODE_BADINTERNALERROR;
     }
     if(!tokenFound) {
-        UA_LOG_ERROR(client->config.logger, UA_LOGCATEGORY_CLIENT, "No anonymous token found");
+        UA_LOG_ERROR(client->config.logger, UA_LOGCATEGORY_CLIENT,
+                     "No anonymous token found");
         return UA_STATUSCODE_BADINTERNALERROR;
     }
     return retval;
@@ -526,7 +534,8 @@ static UA_StatusCode CloseSecureChannel(UA_Client *client) {
     request.requestHeader.requestHandle = ++client->requestHandle;
     request.requestHeader.timestamp = UA_DateTime_now();
     request.requestHeader.timeoutHint = 10000;
-    UA_NodeId_copy(&client->authenticationToken, &request.requestHeader.authenticationToken);
+    UA_NodeId_copy(&client->authenticationToken,
+                   &request.requestHeader.authenticationToken);
 
     UA_SecureConversationMessageHeader msgHeader;
     msgHeader.messageHeader.messageTypeAndChunkType = UA_MESSAGETYPE_CLO + UA_CHUNKTYPE_FINAL;
@@ -539,7 +548,8 @@ static UA_StatusCode CloseSecureChannel(UA_Client *client) {
     seqHeader.sequenceNumber = ++channel->sendSequenceNumber;
     seqHeader.requestId = ++client->requestId;
 
-    UA_NodeId typeId = UA_NODEID_NUMERIC(0, UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST].binaryEncodingId);
+    UA_NodeId typeId =
+        UA_NODEID_NUMERIC(0, UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST].binaryEncodingId);
 
     UA_ByteString message;
     UA_Connection *c = client->connection;
@@ -553,8 +563,8 @@ static UA_StatusCode CloseSecureChannel(UA_Client *client) {
     retval |= UA_SymmetricAlgorithmSecurityHeader_encodeBinary(&symHeader, &message, &offset);
     retval |= UA_SequenceHeader_encodeBinary(&seqHeader, &message, &offset);
     retval |= UA_NodeId_encodeBinary(&typeId, &message, &offset);
-    retval |= UA_encodeBinary(&request, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST], NULL,
-                              NULL, &message, &offset);
+    retval |= UA_encodeBinary(&request, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST],
+                              NULL, NULL, &message, &offset);
 
     msgHeader.messageHeader.messageSize = (UA_UInt32)offset;
     offset = 0;
@@ -582,8 +592,9 @@ UA_Client_getEndpoints(UA_Client *client, const char *serverUrl,
 
 
     UA_StatusCode retval = UA_STATUSCODE_GOOD;
-    *client->connection = client->config.connectionFunc(UA_ConnectionConfig_standard, serverUrl,
-                                                       client->config.logger);
+    *client->connection =
+        client->config.connectionFunc(UA_ConnectionConfig_standard, serverUrl,
+                                      client->config.logger);
     if(client->connection->state != UA_CONNECTION_OPENING) {
         retval = UA_STATUSCODE_BADCONNECTIONCLOSED;
         goto cleanup;
@@ -700,22 +711,26 @@ struct ResponseDescription {
 
 static void
 processServiceResponse(struct ResponseDescription *rd, UA_SecureChannel *channel,
-                       UA_MessageType messageType, UA_UInt32 requestId, UA_ByteString *message) {
+                       UA_MessageType messageType, UA_UInt32 requestId,
+                       UA_ByteString *message) {
     UA_StatusCode retval = UA_STATUSCODE_GOOD;
     UA_ResponseHeader *respHeader = (UA_ResponseHeader*)rd->response;
     rd->processed = true;
 
     /* Check that the request id matches */
-    /* Todo: we need to demux async responses since a publish responses may come at any time */
+    /* Todo: we need to demux async responses since a publish responses may come
+       at any time */
     if(requestId != rd->requestId) {
         UA_LOG_ERROR(rd->client->config.logger, UA_LOGCATEGORY_CLIENT,
-                     "Reply answers the wrong requestId. Async services are not yet implemented.");
+                     "Reply answers the wrong requestId. "
+                     "Async services are not yet implemented.");
         retval = UA_STATUSCODE_BADINTERNALERROR;
         goto finish;
     }
 
     /* Check that the response type matches */
-    const UA_NodeId expectedNodeId = UA_NODEID_NUMERIC(0, rd->responseType->binaryEncodingId);
+    const UA_NodeId expectedNodeId =
+        UA_NODEID_NUMERIC(0, rd->responseType->binaryEncodingId);
     const UA_NodeId serviceFaultNodeId =
         UA_NODEID_NUMERIC(0, UA_TYPES[UA_TYPES_SERVICEFAULT].binaryEncodingId);
     size_t offset = 0;
@@ -726,12 +741,14 @@ processServiceResponse(struct ResponseDescription *rd, UA_SecureChannel *channel
     if(!UA_NodeId_equal(&responseId, &expectedNodeId)) {
         if(UA_NodeId_equal(&responseId, &serviceFaultNodeId)) {
             /* Take the statuscode from the servicefault */
-            retval = UA_decodeBinary(message, &offset, rd->response, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
+            retval = UA_decodeBinary(message, &offset, rd->response,
+                                     &UA_TYPES[UA_TYPES_SERVICEFAULT]);
         } else {
             UA_LOG_ERROR(rd->client->config.logger, UA_LOGCATEGORY_CLIENT,
-                         "Reply answers the wrong request. Expected ns=%i,i=%i. But retrieved ns=%i,i=%i",
-                         expectedNodeId.namespaceIndex, expectedNodeId.identifier.numeric,
-                         responseId.namespaceIndex, responseId.identifier.numeric);
+                         "Reply answers the wrong request. Expected ns=%i,i=%i."
+                         "But retrieved ns=%i,i=%i", expectedNodeId.namespaceIndex,
+                         expectedNodeId.identifier.numeric, responseId.namespaceIndex,
+                         responseId.identifier.numeric);
             UA_NodeId_deleteMembers(&responseId);
             retval = UA_STATUSCODE_BADINTERNALERROR;
         }
@@ -748,13 +765,15 @@ processServiceResponse(struct ResponseDescription *rd, UA_SecureChannel *channel
     } else {
         if(retval == UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED)
             retval = UA_STATUSCODE_BADRESPONSETOOLARGE;
-        UA_LOG_INFO(rd->client->config.logger, UA_LOGCATEGORY_CLIENT, "Error receiving the response");
+        UA_LOG_INFO(rd->client->config.logger, UA_LOGCATEGORY_CLIENT,
+                    "Error receiving the response");
         respHeader->serviceResult = retval;
     }
 }
 
-void __UA_Client_Service(UA_Client *client, const void *r, const UA_DataType *requestType,
-                         void *response, const UA_DataType *responseType) {
+void
+__UA_Client_Service(UA_Client *client, const void *r, const UA_DataType *requestType,
+                    void *response, const UA_DataType *responseType) {
     UA_init(response, responseType);
     UA_ResponseHeader *respHeader = (UA_ResponseHeader*)response;
 
@@ -807,7 +826,7 @@ void __UA_Client_Service(UA_Client *client, const void *r, const UA_DataType *re
         if(!reply.data)
             break;
         UA_SecureChannel_processChunks(client->channel, &reply,
-                                       (UA_ProcessMessageCallback*)processServiceResponse, &rd);
+                     (UA_ProcessMessageCallback*)processServiceResponse, &rd);
     } while(!rd.processed);
 
  finish:

+ 43 - 29
src/client/ua_client_highlevel.c

@@ -6,7 +6,8 @@
 #include "ua_types.h"
 
 UA_StatusCode
-UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri, UA_UInt16 *namespaceIndex) {
+UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri,
+                            UA_UInt16 *namespaceIndex) {
     UA_ReadRequest request;
     UA_ReadRequest_init(&request);
     UA_ReadValueId id;
@@ -45,9 +46,8 @@ UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri, UA_UInt1
 }
 
 UA_StatusCode
-UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId, UA_NodeIteratorCallback callback, void *handle) {
-  UA_StatusCode retval = UA_STATUSCODE_GOOD;
-  
+UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId,
+                               UA_NodeIteratorCallback callback, void *handle) {
   UA_BrowseRequest bReq;
   UA_BrowseRequest_init(&bReq);
   bReq.requestedMaxReferencesPerNode = 0;
@@ -59,16 +59,18 @@ UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId, UA_Nod
   
   UA_BrowseResponse bResp = UA_Client_Service_browse(client, bReq);
   
+  UA_StatusCode retval = UA_STATUSCODE_GOOD;
   if(bResp.responseHeader.serviceResult == UA_STATUSCODE_GOOD) {
-    for (size_t i = 0; i < bResp.resultsSize; ++i) {
-      for (size_t j = 0; j < bResp.results[i].referencesSize; ++j) {
-        UA_ReferenceDescription *ref = &(bResp.results[i].references[j]);
-        retval |= callback(ref->nodeId.nodeId, ! ref->isForward, ref->referenceTypeId, handle);
+      for (size_t i = 0; i < bResp.resultsSize; ++i) {
+          for (size_t j = 0; j < bResp.results[i].referencesSize; ++j) {
+              UA_ReferenceDescription *ref = &(bResp.results[i].references[j]);
+              retval |= callback(ref->nodeId.nodeId, !ref->isForward,
+                                 ref->referenceTypeId, handle);
+          }
       }
-    }
   }
   else
-    retval = bResp.responseHeader.serviceResult;
+      retval = bResp.responseHeader.serviceResult;
   
   
   UA_BrowseRequest_deleteMembers(&bReq);
@@ -82,9 +84,11 @@ UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId, UA_Nod
 /*******************/
 
 UA_StatusCode UA_EXPORT
-UA_Client_addReference(UA_Client *client, const UA_NodeId sourceNodeId, const UA_NodeId referenceTypeId,
-                       UA_Boolean isForward, const UA_String targetServerUri,
-                       const UA_ExpandedNodeId targetNodeId, UA_NodeClass targetNodeClass) {
+UA_Client_addReference(UA_Client *client, const UA_NodeId sourceNodeId,
+                       const UA_NodeId referenceTypeId, UA_Boolean isForward,
+                       const UA_String targetServerUri,
+                       const UA_ExpandedNodeId targetNodeId,
+                       UA_NodeClass targetNodeClass) {
     UA_AddReferencesItem item;
     UA_AddReferencesItem_init(&item);
     item.sourceNodeId = sourceNodeId;
@@ -113,8 +117,9 @@ UA_Client_addReference(UA_Client *client, const UA_NodeId sourceNodeId, const UA
 }
 
 UA_StatusCode UA_EXPORT
-UA_Client_deleteReference(UA_Client *client, const UA_NodeId sourceNodeId, const UA_NodeId referenceTypeId,
-                          UA_Boolean isForward, const UA_ExpandedNodeId targetNodeId,
+UA_Client_deleteReference(UA_Client *client, const UA_NodeId sourceNodeId,
+                          const UA_NodeId referenceTypeId, UA_Boolean isForward,
+                          const UA_ExpandedNodeId targetNodeId,
                           UA_Boolean deleteBidirectional) {
     UA_DeleteReferencesItem item;
     UA_DeleteReferencesItem_init(&item);
@@ -143,7 +148,8 @@ UA_Client_deleteReference(UA_Client *client, const UA_NodeId sourceNodeId, const
 }
 
 UA_StatusCode
-UA_Client_deleteNode(UA_Client *client, const UA_NodeId nodeId, UA_Boolean deleteTargetReferences) {
+UA_Client_deleteNode(UA_Client *client, const UA_NodeId nodeId,
+                     UA_Boolean deleteTargetReferences) {
     UA_DeleteNodesItem item;
     UA_DeleteNodesItem_init(&item);
     item.nodeId = nodeId;
@@ -168,10 +174,11 @@ UA_Client_deleteNode(UA_Client *client, const UA_NodeId nodeId, UA_Boolean delet
 }
 
 UA_StatusCode
-__UA_Client_addNode(UA_Client *client, const UA_NodeClass nodeClass, const UA_NodeId requestedNewNodeId,
-                    const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
-                    const UA_QualifiedName browseName, const UA_NodeId typeDefinition,
-                    const UA_NodeAttributes *attr, const UA_DataType *attributeType, UA_NodeId *outNewNodeId) {
+__UA_Client_addNode(UA_Client *client, const UA_NodeClass nodeClass,
+                    const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
+                    const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
+                    const UA_NodeId typeDefinition, const UA_NodeAttributes *attr,
+                    const UA_DataType *attributeType, UA_NodeId *outNewNodeId) {
     UA_StatusCode retval = UA_STATUSCODE_GOOD;
     UA_AddNodesRequest request;
     UA_AddNodesRequest_init(&request);
@@ -214,8 +221,10 @@ __UA_Client_addNode(UA_Client *client, const UA_NodeClass nodeClass, const UA_No
 #ifdef UA_ENABLE_METHODCALLS
 
 UA_StatusCode
-UA_Client_call(UA_Client *client, const UA_NodeId objectId, const UA_NodeId methodId, size_t inputSize,
-               const UA_Variant *input, size_t *outputSize, UA_Variant **output) {
+UA_Client_call(UA_Client *client, const UA_NodeId objectId,
+               const UA_NodeId methodId, size_t inputSize,
+               const UA_Variant *input, size_t *outputSize,
+               UA_Variant **output) {
     UA_CallRequest request;
     UA_CallRequest_init(&request);
     UA_CallMethodRequest item;
@@ -256,8 +265,9 @@ UA_Client_call(UA_Client *client, const UA_NodeId objectId, const UA_NodeId meth
 /********************/
 
 UA_StatusCode 
-__UA_Client_writeAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_AttributeId attributeId,
-                           const void *in, const UA_DataType *inDataType) {
+__UA_Client_writeAttribute(UA_Client *client, const UA_NodeId *nodeId,
+                           UA_AttributeId attributeId, const void *in,
+                           const UA_DataType *inDataType) {
     if(!in)
       return UA_STATUSCODE_BADTYPEMISMATCH;
     
@@ -268,7 +278,8 @@ __UA_Client_writeAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_Attrib
     if(attributeId == UA_ATTRIBUTEID_VALUE)
         wValue.value.value = *(const UA_Variant*)in;
     else
-        UA_Variant_setScalar(&wValue.value.value, (void*)(uintptr_t)in, inDataType); /* hack. is never written into. */
+        /* hack. is never written into. */
+        UA_Variant_setScalar(&wValue.value.value, (void*)(uintptr_t)in, inDataType);
     wValue.value.hasValue = true;
     UA_WriteRequest wReq;
     UA_WriteRequest_init(&wReq);
@@ -283,7 +294,8 @@ __UA_Client_writeAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_Attrib
 
 UA_StatusCode
 UA_Client_writeArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeId,
-                                        const UA_Int32 *newArrayDimensions, size_t newArrayDimensionsSize) {
+                                        const UA_Int32 *newArrayDimensions,
+                                        size_t newArrayDimensionsSize) {
     if(!newArrayDimensions)
       return UA_STATUSCODE_BADTYPEMISMATCH;
     
@@ -310,8 +322,9 @@ UA_Client_writeArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeI
 /*******************/
 
 UA_StatusCode 
-__UA_Client_readAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_AttributeId attributeId,
-                          void *out, const UA_DataType *outDataType) {
+__UA_Client_readAttribute(UA_Client *client, const UA_NodeId *nodeId,
+                          UA_AttributeId attributeId, void *out,
+                          const UA_DataType *outDataType) {
     UA_ReadValueId item;
     UA_ReadValueId_init(&item);
     item.nodeId = *nodeId;
@@ -357,7 +370,8 @@ __UA_Client_readAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_Attribu
 
 UA_StatusCode
 UA_Client_readArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeId,
-                                       UA_Int32 **outArrayDimensions, size_t *outArrayDimensionsSize) {
+                                       UA_Int32 **outArrayDimensions,
+                                       size_t *outArrayDimensionsSize) {
     UA_ReadValueId item;
     UA_ReadValueId_init(&item);
     item.nodeId = nodeId;

+ 17 - 9
src/client/ua_client_highlevel_subscriptions.c

@@ -5,8 +5,9 @@
 
 #ifdef UA_ENABLE_SUBSCRIPTIONS /* conditional compilation */
 
-UA_StatusCode UA_Client_Subscriptions_new(UA_Client *client, UA_SubscriptionSettings settings,
-                                          UA_UInt32 *newSubscriptionId) {
+UA_StatusCode
+UA_Client_Subscriptions_new(UA_Client *client, UA_SubscriptionSettings settings,
+                            UA_UInt32 *newSubscriptionId) {
     UA_CreateSubscriptionRequest request;
     UA_CreateSubscriptionRequest_init(&request);
     request.requestedPublishingInterval = settings.requestedPublishingInterval;
@@ -45,7 +46,8 @@ UA_StatusCode UA_Client_Subscriptions_new(UA_Client *client, UA_SubscriptionSett
 }
 
 /* remove the subscription remotely */
-UA_StatusCode UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscriptionId) {
+UA_StatusCode
+UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscriptionId) {
     UA_Client_Subscription *sub;
     LIST_FOREACH(sub, &client->subscriptions, listEntry) {
         if(sub->SubscriptionID == subscriptionId)
@@ -57,8 +59,9 @@ UA_StatusCode UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscr
     UA_StatusCode retval = UA_STATUSCODE_GOOD;
     UA_Client_MonitoredItem *mon, *tmpmon;
     LIST_FOREACH_SAFE(mon, &sub->MonitoredItems, listEntry, tmpmon) {
-        retval = UA_Client_Subscriptions_removeMonitoredItem(client, sub->SubscriptionID,
-                                                             mon->MonitoredItemId);
+        retval =
+            UA_Client_Subscriptions_removeMonitoredItem(client, sub->SubscriptionID,
+                                                        mon->MonitoredItemId);
         if(retval != UA_STATUSCODE_GOOD)
             return retval;
     }
@@ -85,7 +88,9 @@ UA_StatusCode UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscr
     return UA_STATUSCODE_GOOD;
 }
 
-void UA_Client_Subscriptions_forceDelete(UA_Client *client, UA_Client_Subscription *sub) {
+void
+UA_Client_Subscriptions_forceDelete(UA_Client *client,
+                                    UA_Client_Subscription *sub) {
     UA_Client_MonitoredItem *mon, *mon_tmp;
     LIST_FOREACH_SAFE(mon, &sub->MonitoredItems, listEntry, mon_tmp) {
         UA_NodeId_deleteMembers(&mon->monitoredNodeId);
@@ -190,7 +195,8 @@ UA_Client_Subscriptions_removeMonitoredItem(UA_Client *client, UA_UInt32 subscri
     if(retval == UA_STATUSCODE_GOOD && response.resultsSize > 1)
         retval = response.results[0];
     UA_DeleteMonitoredItemsResponse_deleteMembers(&response);
-    if(retval != UA_STATUSCODE_GOOD && retval != UA_STATUSCODE_BADMONITOREDITEMIDINVALID) {
+    if(retval != UA_STATUSCODE_GOOD &&
+       retval != UA_STATUSCODE_BADMONITOREDITEMIDINVALID) {
         UA_LOG_INFO(client->config.logger, UA_LOGCATEGORY_CLIENT,
                     "Could not remove monitoreditem %u with statuscode 0x%08x",
                     monitoredItemId, retval);
@@ -204,7 +210,8 @@ UA_Client_Subscriptions_removeMonitoredItem(UA_Client *client, UA_UInt32 subscri
 }
 
 static void
-UA_Client_processPublishResponse(UA_Client *client, UA_PublishRequest *request, UA_PublishResponse *response) {
+UA_Client_processPublishResponse(UA_Client *client, UA_PublishRequest *request,
+                                 UA_PublishResponse *response) {
     if(response->responseHeader.serviceResult != UA_STATUSCODE_GOOD)
         return;
 
@@ -276,7 +283,8 @@ UA_Client_processPublishResponse(UA_Client *client, UA_PublishRequest *request,
     LIST_INSERT_HEAD(&client->pendingNotificationsAcks, tmpAck, listEntry);
 }
 
-UA_StatusCode UA_Client_Subscriptions_manuallySendPublishRequest(UA_Client *client) {
+UA_StatusCode
+UA_Client_Subscriptions_manuallySendPublishRequest(UA_Client *client) {
     if (client->state == UA_CLIENTSTATE_ERRORED)
         return UA_STATUSCODE_BADSERVERNOTCONNECTED;