build: update sdk version to v3.8.2-beta.2 (#63)

dev_gem
Monet Lee 8 months ago committed by GitHub
parent 1958dac89f
commit 0d609d6eef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      go/go.mod
  2. 4
      go/go.sum
  3. 12
      go/protocol.go

@ -2,7 +2,7 @@ module github.com/openimsdk/openim-sdk-cpp
go 1.21 go 1.21
require github.com/openimsdk/openim-sdk-core/v3 v3.8.2-alpha.4 require github.com/openimsdk/openim-sdk-core/v3 v3.8.2-beta.2
require ( require (
github.com/bytedance/sonic v1.9.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect

@ -64,8 +64,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/openimsdk/openim-sdk-core/v3 v3.8.2-alpha.4 h1:0IhK3YliTGljxQBI83DcCcuUsC0/V3WNpwuxuLZcBtA= github.com/openimsdk/openim-sdk-core/v3 v3.8.2-beta.2 h1:4tJcRGpcOY5qXj0yNc2VRw7qrPXoDkJeRfWfKURcy1c=
github.com/openimsdk/openim-sdk-core/v3 v3.8.2-alpha.4/go.mod h1:+kCohTogCuGslz+ZhYQ3cmLV6N8Sr/L83YcDZ4SwvJo= github.com/openimsdk/openim-sdk-core/v3 v3.8.2-beta.2/go.mod h1:+kCohTogCuGslz+ZhYQ3cmLV6N8Sr/L83YcDZ4SwvJo=
github.com/openimsdk/protocol v0.0.72 h1:K+vslwaR7lDXyBzb07UuEQITaqsgighz7NyXVIWsu6A= github.com/openimsdk/protocol v0.0.72 h1:K+vslwaR7lDXyBzb07UuEQITaqsgighz7NyXVIWsu6A=
github.com/openimsdk/protocol v0.0.72/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8= github.com/openimsdk/protocol v0.0.72/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
github.com/openimsdk/tools v0.0.50-alpha.21 h1:ZKgSFkiBjz6KcNZlNwvrSoUYJ7K5Flan8wHuRBH3VqY= github.com/openimsdk/tools v0.0.50-alpha.21 h1:ZKgSFkiBjz6KcNZlNwvrSoUYJ7K5Flan8wHuRBH3VqY=

@ -14,7 +14,6 @@ CB_S DebugPrint;
void Call_CB_S(CB_S func,char* data) void Call_CB_S(CB_S func,char* data)
{ {
if(func == NULL){ if(func == NULL){
printf("callback func is null\n");
return; return;
} }
func(data); func(data);
@ -24,7 +23,6 @@ void Call_CB_S(CB_S func,char* data)
void Call_CB_I_S(CB_I_S func,int event,char* data) void Call_CB_I_S(CB_I_S func,int event,char* data)
{ {
if(func == NULL){ if(func == NULL){
printf("callback func is null\n");
return; return;
} }
if (strcmp(data, "\"\"") == 0) { if (strcmp(data, "\"\"") == 0) {
@ -33,44 +31,37 @@ void Call_CB_I_S(CB_I_S func,int event,char* data)
func(event,data); func(event,data);
if (data != NULL && data[0] != '\0') if (data != NULL && data[0] != '\0')
{ {
printf("this is not null data event\n");
free(data); free(data);
} }
} }
void Call_CB_S_I_S_S(CB_S_I_S_S func,char* operationID, int errCode,char* errMsg,char* data) void Call_CB_S_I_S_S(CB_S_I_S_S func,char* operationID, int errCode,char* errMsg,char* data)
{ {
if(func == NULL){ if(func == NULL){
printf("callback func is null\n");
return; return;
} }
if (strcmp(data, "\"\"") == 0) { if (strcmp(data, "\"\"") == 0) {
strcpy(data, ""); strcpy(data, "");
} }
if (strlen(errMsg) != 0 && errMsg[strlen(errMsg) - 1] != '\0') { if (strlen(errMsg) != 0 && errMsg[strlen(errMsg) - 1] != '\0') {
printf("ttttt %s\n",errMsg);
strncat(errMsg, "\0", 1); strncat(errMsg, "\0", 1);
} }
func(operationID,errCode,errMsg,data); func(operationID,errCode,errMsg,data);
if (errMsg != NULL && errMsg[0] != '\0') if (errMsg != NULL && errMsg[0] != '\0')
{ {
printf("this is not null errmsg %s\n",errMsg);
free(errMsg); free(errMsg);
} }
if (data != NULL && data[0] != '\0') if (data != NULL && data[0] != '\0')
{ {
printf("this is not null data base,opid:%s,data:%s\n",operationID,data);
free(data); free(data);
} }
if (operationID != NULL) if (operationID != NULL)
{ {
printf("this is not null operationID:%s\n",operationID);
free(operationID); free(operationID);
} }
} }
void Call_CB_S_I_S_S_I(CB_S_I_S_S_I func,char* operationID,int errCode,char* errMsg,char* data,int progress) void Call_CB_S_I_S_S_I(CB_S_I_S_S_I func,char* operationID,int errCode,char* errMsg,char* data,int progress)
{ {
if(func == NULL){ if(func == NULL){
printf("callback func is null\n");
return; return;
} }
if(strcmp(data, "\"\"") == 0) { if(strcmp(data, "\"\"") == 0) {
@ -79,17 +70,14 @@ void Call_CB_S_I_S_S_I(CB_S_I_S_S_I func,char* operationID,int errCode,char* err
func(operationID,errCode,errMsg,data,progress); func(operationID,errCode,errMsg,data,progress);
if (errMsg != NULL && errMsg[0] != '\0') if (errMsg != NULL && errMsg[0] != '\0')
{ {
printf("this is not null errmsg\n");
free(errMsg); free(errMsg);
} }
if (data != NULL && data[0] != '\0') if (data != NULL && data[0] != '\0')
{ {
printf("this is not null data\n");
free(data); free(data);
} }
if (operationID != NULL) if (operationID != NULL)
{ {
printf("this is not null operationID\n");
free(operationID); free(operationID);
} }
} }

Loading…
Cancel
Save