|
|
|
@ -14,7 +14,6 @@ CB_S DebugPrint; |
|
|
|
|
void Call_CB_S(CB_S func,char* data) |
|
|
|
|
{ |
|
|
|
|
if(func == NULL){ |
|
|
|
|
printf("callback func is null\n"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
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) |
|
|
|
|
{ |
|
|
|
|
if(func == NULL){ |
|
|
|
|
printf("callback func is null\n"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (strcmp(data, "\"\"") == 0) { |
|
|
|
@ -33,44 +31,37 @@ void Call_CB_I_S(CB_I_S func,int event,char* data) |
|
|
|
|
func(event,data); |
|
|
|
|
if (data != NULL && data[0] != '\0') |
|
|
|
|
{ |
|
|
|
|
printf("this is not null data event\n"); |
|
|
|
|
free(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){ |
|
|
|
|
printf("callback func is null\n"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (strcmp(data, "\"\"") == 0) { |
|
|
|
|
strcpy(data, ""); |
|
|
|
|
} |
|
|
|
|
if (strlen(errMsg) != 0 && errMsg[strlen(errMsg) - 1] != '\0') { |
|
|
|
|
printf("ttttt %s\n",errMsg); |
|
|
|
|
strncat(errMsg, "\0", 1); |
|
|
|
|
} |
|
|
|
|
func(operationID,errCode,errMsg,data); |
|
|
|
|
if (errMsg != NULL && errMsg[0] != '\0') |
|
|
|
|
{ |
|
|
|
|
printf("this is not null errmsg %s\n",errMsg); |
|
|
|
|
free(errMsg); |
|
|
|
|
} |
|
|
|
|
if (data != NULL && data[0] != '\0') |
|
|
|
|
{ |
|
|
|
|
printf("this is not null data base,opid:%s,data:%s\n",operationID,data); |
|
|
|
|
free(data); |
|
|
|
|
} |
|
|
|
|
if (operationID != NULL) |
|
|
|
|
{ |
|
|
|
|
printf("this is not null operationID:%s\n",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) |
|
|
|
|
{ |
|
|
|
|
if(func == NULL){ |
|
|
|
|
printf("callback func is null\n"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
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); |
|
|
|
|
if (errMsg != NULL && errMsg[0] != '\0') |
|
|
|
|
{ |
|
|
|
|
printf("this is not null errmsg\n"); |
|
|
|
|
free(errMsg); |
|
|
|
|
} |
|
|
|
|
if (data != NULL && data[0] != '\0') |
|
|
|
|
{ |
|
|
|
|
printf("this is not null data\n"); |
|
|
|
|
free(data); |
|
|
|
|
} |
|
|
|
|
if (operationID != NULL) |
|
|
|
|
{ |
|
|
|
|
printf("this is not null operationID\n"); |
|
|
|
|
free(operationID); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|