ganeshmurthy commented on a change in pull request #744: URL: https://github.com/apache/qpid-dispatch/pull/744#discussion_r431257755
########## File path: src/connection.h ########## @@ -0,0 +1,87 @@ +#ifndef __connection_h__ +#define __connection_h__ 1 + +/* + * 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 <netdb.h> // For NI_MAXHOST/NI_MAXSERV +#include <proton/engine.h> +#include <proton/event.h> +#include <proton/ssl.h> +#include <qpid/dispatch/server.h> + +#include "server_private.h" + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif + +#ifndef NI_MAXSERV +#define NI_MAXSERV 32 +#endif + +// Connection objects wrap Proton connection objects +// +// The `user_id` field is populated from the client SSL cert. See +// ssl_uid_format in server.h for more info. +struct qd_connection_t { + DEQ_LINKS(qd_connection_t); + char* name; + qd_server_t* server; + bool opened; // An open callback was invoked for this connection + bool closed; + bool closed_locally; + int enqueued; + qd_timer_t* timer; // Timer for initial setup + pn_connection_t* pn_conn; + pn_session_t* pn_sessions[QD_SSN_CLASS_COUNT]; + pn_ssl_t* ssl; + qd_listener_t* listener; + qd_connector_t* connector; Review comment: I don't have a problem with either way. If you apply the new style in .clang-format will doing "clang-format -i src/*.c" change the style throughout the code? By that I mean, if we are changing the style here, we will have to do the same everywhere. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org