diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-08-10 12:01:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-08-10 12:01:51 +0200 |
commit | ccfc550b12b142c11dcf4d249d086925af0443c4 (patch) | |
tree | ef39de54973053dad5d130cfeb1feb3f55b7c1cc /lib | |
parent | 499ce7f7eb7c228d72e646527ce9a5c2950ad58f (diff) |
New upstream version 3.1.4upstream/3.1.4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 28 | ||||
-rw-r--r-- | lib/lanplus/ipmiplus.mak | 3 | ||||
-rw-r--r-- | lib/lanplus/lanplus.c | 47 | ||||
-rw-r--r-- | lib/libipmiutil.pc | 2 |
4 files changed, 42 insertions, 38 deletions
diff --git a/lib/Makefile b/lib/Makefile index b21e936..aced884 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,12 +47,12 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run tar +ACLOCAL = ${SHELL} /home/public/cress/ipmiutil/src/missing --run aclocal-1.11 +AMTAR = ${SHELL} /home/public/cress/ipmiutil/src/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run automake-1.11 +AUTOCONF = ${SHELL} /home/public/cress/ipmiutil/src/missing --run autoconf +AUTOHEADER = ${SHELL} /home/public/cress/ipmiutil/src/missing --run autoheader +AUTOMAKE = ${SHELL} /home/public/cress/ipmiutil/src/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -101,7 +101,7 @@ LIB_DIR = /usr/lib64 LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run makeinfo +MAKEINFO = ${SHELL} /home/public/cress/ipmiutil/src/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = @@ -115,9 +115,9 @@ OTOOL64 = PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.1.3 +PACKAGE_STRING = ipmiutil 3.1.4 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.1.3 +PACKAGE_VERSION = 3.1.4 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -129,11 +129,11 @@ SHR_LINK = libipmiutil.so.1 STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.1.3 -abs_builddir = /usr/dev/ipmiutil-3.1.3/lib -abs_srcdir = /usr/dev/ipmiutil-3.1.3/lib -abs_top_builddir = /usr/dev/ipmiutil-3.1.3 -abs_top_srcdir = /usr/dev/ipmiutil-3.1.3 +VERSION = 3.1.4 +abs_builddir = /home/public/cress/ipmiutil/src/lib +abs_srcdir = /home/public/cress/ipmiutil/src/lib +abs_top_builddir = /home/public/cress/ipmiutil/src +abs_top_srcdir = /home/public/cress/ipmiutil/src ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -161,7 +161,7 @@ host_vendor = redhat htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.1.3/install-sh +install_sh = ${SHELL} /home/public/cress/ipmiutil/src/install-sh libdir = $(iprefix)/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/lib/lanplus/ipmiplus.mak b/lib/lanplus/ipmiplus.mak index 9a1435a..5c851c2 100644 --- a/lib/lanplus/ipmiplus.mak +++ b/lib/lanplus/ipmiplus.mak @@ -16,7 +16,8 @@ CF_EX=/DWIN32 $(INC) /D_CONSOLE /DNDEBUG /D_CRT_SECURE_NO_DEPRECATE # CFLAGS= /W3 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo $(CF_EX)
# CFLAGS= /W3 /O2 /Zi /MD /GF /Gy /nologo $(CF_EX)
# CFLAGS= /W3 /O2 /Zi /MD /nologo $(CF_EX)
-CFLAGS= /W3 /O2 /Zi /MT /nologo $(CF_EX)
+#CFLAGS= /W3 /O2 /Zi /MT /nologo $(CF_EX) /DHAVE_IPV6
+CFLAGS= /W3 /O2 /Zi /MT /nologo $(CF_EX)
MKLIB=lib
RM=del
diff --git a/lib/lanplus/lanplus.c b/lib/lanplus/lanplus.c index e423ede..c910b85 100644 --- a/lib/lanplus/lanplus.c +++ b/lib/lanplus/lanplus.c @@ -32,19 +32,18 @@ /* ARCress, TODO: improve error handling and remove all assert() calls here. */ #ifdef WIN32 -#include <windows.h> -#include <stdio.h> -#include <stdlib.h> -#include <inttypes-win.h> -#include <io.h> -#include <signal.h> -//#define HAVE_IPV6 1 #ifdef HAVE_IPV6 #include <winsock2.h> //#include <ws2tcpip.h> #else #include <winsock.h> #endif +#include <windows.h> +#include <stdio.h> +#include <stdlib.h> +#include <inttypes-win.h> +#include <io.h> +#include <signal.h> #include <time.h> #else #include <stdlib.h> @@ -103,7 +102,11 @@ static int my_ai_flags = AI_NUMERICSERV; /*0x0400 Dont use name resolution NEW*/ #undef HAVE_IPV6 #endif #ifdef HAVE_IPV6 +#ifdef WIN32 +#define SOCKADDR_T SOCKADDR_STORAGE +#else #define SOCKADDR_T struct sockaddr_storage +#endif #else #define SOCKADDR_T struct sockaddr_in #endif @@ -3703,7 +3706,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf) #endif #ifdef HAVE_IPV6 - session->addrlen = 0; + session->addrlen = 0; memset(&session->addr, 0, sizeof(session->addr)); memset(&addr, 0, sizeof(addr)); sprintf(service, "%d", session->port); @@ -3714,10 +3717,10 @@ ipmi_lanplus_open(struct ipmi_intf * intf) hints.ai_flags = my_ai_flags; hints.ai_protocol = IPPROTO_UDP; /* */ - rc = getaddrinfo((char *)session->hostname, service, &hints, &result); + rc = getaddrinfo((char *)session->hostname, service, &hints, &result); if (rc != 0) { - lprintf(LOG_ERR, "Address lookup for %s failed with %d", - session->hostname,rc); + lprintf(LOG_ERR, "Address lookup for %s failed with %d, %s", + session->hostname,rc,gai_strerror(rc)); return -1; } @@ -3725,24 +3728,24 @@ ipmi_lanplus_open(struct ipmi_intf * intf) * Try each address until we successfully connect(2). */ for (rp = result; rp != NULL; rp = rp->ai_next) { - intf->fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); - if (intf->fd == -1) continue; + intf->fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); + if (intf->fd == -1) continue; /* valid protocols are IPPROTO_UDP, IPPROTO_IPV6 */ if (rp->ai_protocol == IPPROTO_TCP) continue; /*IPMI != TCP*/ lprintf(LOG_DEBUG, "lanplus socket(%d,%d,%d), connect(%d)", rp->ai_family, rp->ai_socktype, rp->ai_protocol, intf->fd ); - if (connect(intf->fd, rp->ai_addr, rp->ai_addrlen) != -1) { + if (connect(intf->fd, rp->ai_addr, rp->ai_addrlen) != -1) { lprintf(LOG_DEBUG, "lanplus connect ok, addrlen=%d size=%d", rp->ai_addrlen,sizeof(addr)); - addrlen = rp->ai_addrlen; - memcpy(&addr, rp->ai_addr, addrlen); - // memcpy(&session->addr, rp->ai_addr, rp->ai_addrlen); - session->addrlen = rp->ai_addrlen; - break; /* Success */ - } - close(intf->fd); - intf->fd = -1; + addrlen = rp->ai_addrlen; + memcpy(&addr, rp->ai_addr, addrlen); + // memcpy(&session->addr, rp->ai_addr, rp->ai_addrlen); + session->addrlen = rp->ai_addrlen; + break; /* Success */ + } + close(intf->fd); + intf->fd = -1; } freeaddrinfo(result); /* Done with addrinfo */ if (intf->fd < 0) { diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc index e0c50a2..4fe6772 100644 --- a/lib/libipmiutil.pc +++ b/lib/libipmiutil.pc @@ -8,6 +8,6 @@ nutuser=@RUN_AS_USER@ Name: libipmiutil Description: Library for ipmiutil -Version: 3.1.3 +Version: 3.1.4 Libs: -L${libdir} -lipmi_lanplus Cflags: -I${includedir} |