version 1.2, 2025/03/09 15:20:18
|
version 1.4, 2025/03/22 18:43:54
|
Line 1
|
Line 1
|
/* |
/* |
* * |
* $Id$ |
* * * |
|
* * * |
|
* *************** |
|
* * * * * |
|
* * MUMPS * |
|
* * * * * |
|
* *************** |
|
* * * |
|
* * * |
|
* * |
|
* |
|
* io_socket.c |
|
* socket i/o support |
* socket i/o support |
* |
* |
* |
* |
* Author: Serena Willis <snw@coherent-logic.com> |
* Author: Serena Willis <snw@coherent-logic.com> |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 1998 MUG Deutschland |
* Copyright (C) 2020 Coherent Logic Development LLC |
* Copyright (C) 2020, 2025 Coherent Logic Development LLC |
* |
* |
* |
* |
* This file is part of FreeM. |
* This file is part of FreeM. |
Line 35
|
Line 23
|
* You should have received a copy of the GNU Affero Public License |
* You should have received a copy of the GNU Affero Public License |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
|
* $Log$ |
|
* Revision 1.4 2025/03/22 18:43:54 snw |
|
* Make STRLEN 255 chars and add BIGSTR macro for larger buffers |
|
* |
|
* Revision 1.3 2025/03/09 19:14:25 snw |
|
* First phase of REUSE compliance and header reformat |
|
* |
|
* |
|
* SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC |
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
**/ |
**/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
Line 104 short msck_open (int channel, char *addr
|
Line 102 short msck_open (int channel, char *addr
|
|
|
short i = channel + FIRSTSCK; /* get index into io_sockets[] array */ |
short i = channel + FIRSTSCK; /* get index into io_sockets[] array */ |
|
|
finaddr = (char *) malloc (STRLEN * sizeof (char)); |
finaddr = (char *) malloc (256 * sizeof (char)); |
NULLPTRCHK(finaddr,"msck_open"); |
NULLPTRCHK(finaddr,"msck_open"); |
|
|
|
|
Line 125 short msck_open (int channel, char *addr
|
Line 123 short msck_open (int channel, char *addr
|
|
|
if (ct == 1) { |
if (ct == 1) { |
|
|
family = (char *) malloc (STRLEN * sizeof (char)); |
family = (char *) malloc (256 * sizeof (char)); |
NULLPTRCHK(family,"msck_open"); |
NULLPTRCHK(family,"msck_open"); |
|
|
typ = (char *) malloc (STRLEN * sizeof (char)); |
typ = (char *) malloc (256 * sizeof (char)); |
NULLPTRCHK(typ,"msck_open"); |
NULLPTRCHK(typ,"msck_open"); |
|
|
strcpy (family, "IPV4"); |
strcpy (family, "IPV4"); |
Line 138 short msck_open (int channel, char *addr
|
Line 136 short msck_open (int channel, char *addr
|
if (ct == 2) { |
if (ct == 2) { |
family = strtok (NULL, ":"); |
family = strtok (NULL, ":"); |
|
|
typ = (char *) malloc (STRLEN * sizeof (char)); |
typ = (char *) malloc (256 * sizeof (char)); |
NULLPTRCHK(typ,"msck_open"); |
NULLPTRCHK(typ,"msck_open"); |
|
|
strcpy (typ, "TCP"); |
strcpy (typ, "TCP"); |