Skip to content

Commit

Permalink
ubi9 Compilation Warnings (#196)
Browse files Browse the repository at this point in the history
* Initial openssl changes: replaced RSA with PKEY

* More changes related to deprecated encryption API change

* some code cleanup

* minor change

* remove unwanted changes

* ubi8:openssl-1.x and ubi9:openssl-3.x support

* include of param_build in condition

* minor changes for ubi8

* reverting ubi8 code to free RSA memory

* Initial changes to support encrypt/decrypt functionality for openSSL3.0

* Addressed review comment for failure of EVP functions

* Addressed review comments

* Couple of more warnings addressed for ubi9

* addressed warning from server_store module

* ubi8 compilation support

* ubi8 compilation support
  • Loading branch information
vpatel9305 authored Oct 10, 2024
1 parent dfc3cfb commit 23efc56
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion server_admin/src/janssonProcessPost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ XAPI void ism_config_setServerName(int getLock, int setDefault) {
struct utsname buf;

/* get current admin port */
int port = ism_config_json_getAdminPort(getLock);
unsigned short port = ism_config_json_getAdminPort(getLock);

/* Get current ServerName */
if ( getLock == 1 ) pthread_rwlock_wrlock(&srvConfiglock);
Expand Down
4 changes: 2 additions & 2 deletions server_engine/test/test_multiConsumerQ.c
Original file line number Diff line number Diff line change
Expand Up @@ -2904,7 +2904,7 @@ void test_DeepSelection(void)
rc = pthread_mutex_unlock(&controlMutex);
TEST_ASSERT_EQUAL(rc, OK);

(void)pthread_yield();
(void)sched_yield();

rc = pthread_mutex_lock(&controlMutex);
TEST_ASSERT_EQUAL(rc, OK);
Expand Down Expand Up @@ -3219,7 +3219,7 @@ void test_UnackdSelection(void)
rc = pthread_mutex_unlock(&controlMutex);
TEST_ASSERT_EQUAL(rc, OK);

(void)pthread_yield();
(void)sched_yield();

rc = pthread_mutex_lock(&controlMutex);
TEST_ASSERT_EQUAL(rc, OK);
Expand Down
2 changes: 1 addition & 1 deletion server_engine/test/test_queue2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ static void Queue2_EnableDisable( ismQueueType_t type
TEST_ASSERT_EQUAL(rc, OK);
}

pthread_yield();
sched_yield();
}

// Having reached here ask the putters to stop
Expand Down
7 changes: 6 additions & 1 deletion server_proxy/src/pxtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,12 @@ static void sslTraceErr(ism_transport_t * transport, uint32_t rc, const char *
}
}
for (;;) {
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#if OPENSSL_VERSION_NUMBER < 0x30000000L
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#else
const char * func;
rc = (uint32_t)ERR_get_error_all(&file, &line, &func, &data, &flags);
#endif
if (rc == 0)
break;
ERR_error_string_n(rc, mbuf, sizeof mbuf);
Expand Down
12 changes: 11 additions & 1 deletion server_store/src/storeHighAvailability.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ static void sslTraceErr(ConnInfoRec *cInfo, uint32_t rc, const char * file, int
{
int flags, i=1;
const char * data;
const char * fn;
char mbuf[1024];
char * pos;
int err = errno;
Expand All @@ -177,7 +178,12 @@ static void sslTraceErr(ConnInfoRec *cInfo, uint32_t rc, const char * file, int
i=0;
}
for (;;) {
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#if OPENSSL_VERSION_NUMBER < 0x30000000L
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#else
const char * func;
rc = (uint32_t)ERR_get_error_all(&file, &line, &fn, &data, &flags);
#endif
if (rc == 0)
break;
ERR_error_string_n(rc, mbuf, sizeof mbuf);
Expand Down Expand Up @@ -5059,6 +5065,10 @@ int cip_prepare_req_msg(haGlobalInfo *gInfo)
int numActiveConns;
char *p ;
ismCluster_Statistics_t cs[1];
cs->connectedServers=cs->disconnectedServers=0;
cs->pClusterName=cs->pServerName=cs->pServerUID=NULL;
cs->healthStatus=ISM_CLUSTER_HEALTH_UNKNOWN;
cs->haStatus=ISM_CLUSTER_HA_UNKNOWN;
haConReqMsg *msg = &gInfo->dInfo->req_msg[0] ;
memset(msg, 0, sizeof(haConReqMsg)) ;
//msg->msg_len = sizeof(haConReqMsg) - INT_SIZE ;
Expand Down
2 changes: 1 addition & 1 deletion server_store/src/storeMemoryHA.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ static int ism_store_memHASendAck(ismStore_memHAChannel_t *pHAChannel, ismStore_
ismStore_memHAMsgType_t msgType = StoreHAMsg_Ack;
char *pBuffer=NULL, *pPos=NULL;
int rc;
uint32_t opcount, bufferLength;
uint32_t opcount=0, bufferLength;

if ((rc = ism_store_memHAEnsureBufferAllocation(pHAChannel,
&pBuffer,
Expand Down
9 changes: 7 additions & 2 deletions server_transport/src/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,12 @@ static void sslTraceErr(ism_transport_t * transport, uint32_t rc, const char *
}
}
for (;;) {
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#if OPENSSL_VERSION_NUMBER < 0x30000000L
rc = (uint32_t)ERR_get_error_line_data(&file, &line, &data, &flags);
#else
const char * func;
rc = (uint32_t)ERR_get_error_all(&file, &line, &func, &data, &flags);
#endif
if (rc == 0)
break;
ERR_error_string_n(rc, mbuf, sizeof mbuf);
Expand Down Expand Up @@ -2581,7 +2586,7 @@ HOT static void * ism_tcp_ioProcessorThreadProc(void * parm, void * context, int
if (value) {
if (iopDelay > 0) {
for (i = 0; i < iopDelay; i++) {
pthread_yield();
sched_yield();
}
} else {
ism_common_sleep(-iopDelay);
Expand Down

1 comment on commit 23efc56

@eclipse-amlen-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built with quay.io/amlen/amlen-builder-almalinux9:main-1.0.0.11

Please sign in to comment.