# Potential Bug in 04.00.22 SLQS Callback Header

**URL:** <https://forum.sierrawireless.com/t/potential-bug-in-04-00-22-slqs-callback-header/19543>\
**Category:** Uncategorized\
**Created:** [February 28, 2020, 12:07am UTC](https://forum.sierrawireless.com/t/potential-bug-in-04-00-22-slqs-callback-header/19543 "2020-02-28T00:07:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cobb.jason](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@cobb.jason](https://forum.sierrawireless.com/u/cobb.jason)\
**Post date:** [February 28, 2020, 12:07am UTC](https://forum.sierrawireless.com/t/potential-bug-in-04-00-22-slqs-callback-header/19543/1 "2020-02-28T00:07:07Z")

</div>

Can somebody do a code inspection of the declarations associated with SLQSSetDHCPv4ClientLeaseStatusCallback in qaGobiApiCbk.h?

I’m compiling on Ubuntu 16.04, using gcc 5.4.0. with the 04.00.22 SLQS. I cant the following to compile:

SLQSSetDHCPv4ClientLeaseStatusCallbackParam dhcpV4Param;  
dhcpV4Param.instance = 0;  
dhcpV4Param.pCallback = DHCPv4ClientLeaseStatusCallback; \<----Compiler barfs here

Compiler complains:  
src/qmi\_callbacks.c: In function ‘SubscribeCallbacks’:  
src/qmi\_callbacks.c:97:25: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]  
dhcpV4Param.pCallback = DHCPv4ClientLeaseStatusCallback;

If I assign instance to 0 and pCallback to NULL it compiles fine. I’ve looked at other callback declarations (the typedefs and structs, etc) and see one thing interesting about the parameter declaration for SLQSSetDHCPv4ClientLeaseStatusCallback:

/\*\*

- DHCPv4 client lease status message callback function parameter.
- 
- \param instance[IN]
- 

```
     - QMI instance

```

- 
- \param pCallback[IN]
- 

```
     - Callback function pointer (0 - Disable)

```

- 

\*/  
typedef struct  
{  
BYTE instance;  
tFNDHCPv4ClientLeaseStatus \*pCallback;  
}SLQSSetDHCPv4ClientLeaseStatusCallbackParam;

Should it be:

tFNDHCPv4ClientLeaseStatus pCallback;

instead?

Or then again, maybe the problem is between my keyboard and my chair.

Thanks for any help.

Forgot to add function:  
// This compiles fine by itself  
void DHCPv4ClientLeaseStatusCallback( BYTE instance, WdsDHCPv4ClientLeaseInd \*pMsg)  
{  
printf(“_**DHCPv4ClientLeaseStatusCallback()**_\n”);  
printf(“DCHP CL: my instance is %d\n”, instance);

printf(“DHCP CL: Lease State %d\n”, \*(pMsg-\>pLeaseState));  
printf(“DHCP CL: IPV4 Address %d\n”, \*(pMsg-\>pIPv4Addr));  
}
