console-client.c (b70f8713e37719b6dad0cf8e1bf7f6edae5911d6) console-client.c (b14ca19cf380efbf7a96a348cc6fc81e75bf0591)
1/**
2 * Copyright © 2016 IBM Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0

--- 213 unchanged lines hidden (view full) ---

222 client->console_sd = socket(AF_UNIX, SOCK_STREAM, 0);
223 if (!client->console_sd) {
224 warn("Can't open socket");
225 return -1;
226 }
227
228 memset(&addr, 0, sizeof(addr));
229 addr.sun_family = AF_UNIX;
1/**
2 * Copyright © 2016 IBM Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0

--- 213 unchanged lines hidden (view full) ---

222 client->console_sd = socket(AF_UNIX, SOCK_STREAM, 0);
223 if (!client->console_sd) {
224 warn("Can't open socket");
225 return -1;
226 }
227
228 memset(&addr, 0, sizeof(addr));
229 addr.sun_family = AF_UNIX;
230 len = console_socket_path(&addr, socket_id);
230 len = console_socket_path(addr.sun_path, socket_id);
231 if (len < 0) {
232 if (errno) {
233 warn("Failed to configure socket: %s", strerror(errno));
234 } else {
235 warn("Socket name length exceeds buffer limits");
236 }
237 goto cleanup;
238 }

--- 149 unchanged lines hidden ---
231 if (len < 0) {
232 if (errno) {
233 warn("Failed to configure socket: %s", strerror(errno));
234 } else {
235 warn("Socket name length exceeds buffer limits");
236 }
237 goto cleanup;
238 }

--- 149 unchanged lines hidden ---