Ubus_subscribe callback return code

I'm using ubus_subscribe this way:


    /* Network callback */
    sub.cb = dashboard_network_cb;
    ubus_register_subscriber( ctx, &sub );
    rc = ubus_lookup_id( ctx, "network.interface.lan", &id );
	if( !rc )
        rc = ubus_subscribe( ctx, &sub, id );
	if( rc )
        fprintf( stderr, "Error while registering for network event: %s\n",
                 ubus_strerror(rc) );
        goto _fin;


The prototype of sub.cb callback is

typedef int (*ubus_handler_t)(struct ubus_context *ctx, struct ubus_object *obj,
			      struct ubus_request_data *req,
			      const char *method, struct blob_attr *msg);

meaning that it should return int and I assume it is a return code. But I can't see what is the purpose of this code. If my callback returns non zero value what will happen?

As far as I understand the implementation, the return code of the subscriber callback is ignored.

A future implementation could treat non-zero return codes differently, e.g. by disabling the subscription or throttling notifications, but that is just speculation. Right now, the return value is ignored and should be hardcoded to 0 or UBUS_STATUS_OK to avoid potential future quirks.

Thanks Jow.
I will follow your suggestion.