phrocker commented on a change in pull request #674: Minificpp 1007 - ECU C2 integration. URL: https://github.com/apache/nifi-minifi-cpp/pull/674#discussion_r343733399
########## File path: nanofi/src/processors/site2site_output.c ########## @@ -0,0 +1,169 @@ + /* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#include <errno.h> +#include <stdio.h> +#include <processors/site2site_output.h> + +void initialize_s2s_output(site2site_output_context_t * ctx) { + pthread_mutex_init(&ctx->client_mutex, NULL); + pthread_mutex_init(&ctx->stop_mutex, NULL); + pthread_cond_init(&ctx->stop_cond, NULL); +} + +void start_s2s_output(site2site_output_context_t * ctx) { + pthread_mutex_lock(&ctx->stop_mutex); + ctx->stop = 0; + pthread_mutex_unlock(&ctx->stop_mutex); +} + +void free_s2s_output_context(site2site_output_context_t * ctx) { Review comment: I think we should avoid s2s and site2site and keep it sitetosite throughout. MiNiFI C++ has some vestigial references to site2site, but this should be a no-op change and improve use of this. It may be confusing especially for structs to have 2 in the name when I think the convention from nifi is to use 'to' ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
