Skip to content

Commit 4bfdb17

Browse files
committed
Global Request functions
1. Readjust the whitespace in the Global Request functions. 2. Remove redundant logging statements.
1 parent 2f08363 commit 4bfdb17

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/internal.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13477,7 +13477,8 @@ int SendIgnore(WOLFSSH* ssh, const unsigned char* data, word32 dataSz)
1347713477
return ret;
1347813478
}
1347913479

13480-
int SendGlobalRequest(WOLFSSH* ssh, const unsigned char* data, word32 dataSz, int reply)
13480+
int SendGlobalRequest(WOLFSSH* ssh,
13481+
const unsigned char* data, word32 dataSz, int reply)
1348113482
{
1348213483
byte* output;
1348313484
word32 idx = 0;
@@ -13490,18 +13491,15 @@ int SendGlobalRequest(WOLFSSH* ssh, const unsigned char* data, word32 dataSz, in
1349013491

1349113492
if (ret == WS_SUCCESS)
1349213493
ret = PreparePacket(ssh, MSG_ID_SZ + LENGTH_SZ + dataSz + BOOLEAN_SZ);
13493-
WLOG(WS_LOG_DEBUG, "Done PreparePacket");
1349413494

13495-
if (ret == WS_SUCCESS)
13496-
{
13495+
if (ret == WS_SUCCESS) {
1349713496
output = ssh->outputBuffer.buffer;
1349813497
idx = ssh->outputBuffer.length;
1349913498

1350013499
output[idx++] = MSGID_GLOBAL_REQUEST;
1350113500
c32toa(dataSz, output + idx);
1350213501
idx += LENGTH_SZ;
13503-
if (dataSz > 0)
13504-
{
13502+
if (dataSz > 0) {
1350513503
WMEMCPY(output + idx, data, dataSz);
1350613504
idx += dataSz;
1350713505
}
@@ -13512,12 +13510,11 @@ int SendGlobalRequest(WOLFSSH* ssh, const unsigned char* data, word32 dataSz, in
1351213510

1351313511
ret = BundlePacket(ssh);
1351413512
}
13515-
WLOG(WS_LOG_DEBUG, "Done BundlePacket");
1351613513

1351713514
if (ret == WS_SUCCESS)
1351813515
ret = wolfSSH_SendPacket(ssh);
1351913516

13520-
WLOG(WS_LOG_DEBUG, "Leaving SendServiceRequest(), ret = %d", ret);
13517+
WLOG(WS_LOG_DEBUG, "Leaving SendGlobalRequest(), ret = %d", ret);
1352113518

1352213519
return ret;
1352313520
}
@@ -13590,8 +13587,7 @@ int SendServiceRequest(WOLFSSH* ssh, byte serviceId)
1359013587
serviceName = IdToName(serviceId);
1359113588
serviceNameSz = (word32)WSTRLEN(serviceName);
1359213589

13593-
ret = PreparePacket(ssh,
13594-
MSG_ID_SZ + LENGTH_SZ + serviceNameSz);
13590+
ret = PreparePacket(ssh, MSG_ID_SZ + LENGTH_SZ + serviceNameSz);
1359513591
}
1359613592

1359713593
if (ret == WS_SUCCESS) {

0 commit comments

Comments
 (0)