Skip to content
Permalink
Browse files
Minor indentation adjustment.
  • Loading branch information
PengZheng committed Apr 7, 2022
1 parent d608c59 commit a7412f9526fa4d9679ede258b3f5fccfae4c058a
Showing 1 changed file with 21 additions and 21 deletions.
@@ -188,30 +188,30 @@ static celix_status_t refiningDriver_registerDevice(refining_driver_pt driver, r
}

celix_status_t refiningDriver_attach(void * driverHandler, service_reference_pt reference, char **result) {
printf("REFINING_DRIVER: attached called\n");
celix_status_t status = CELIX_SUCCESS;
refining_driver_pt driver = driverHandler;
(*result) = NULL;
base_driver_device_service_pt device_service = NULL;
status = bundleContext_getService(driver->context, reference, (void **)&device_service);
if (status == CELIX_SUCCESS) {
refining_driver_device_pt refiningDevice = NULL;
status = refiningDriver_createDevice(driver, reference, device_service, &refiningDevice);
if (status == CELIX_SUCCESS) {
driver->deviceCount+=1;
char *serial;
printf("REFINING_DRIVER: attached called\n");
celix_status_t status = CELIX_SUCCESS;
refining_driver_pt driver = driverHandler;
(*result) = NULL;
base_driver_device_service_pt device_service = NULL;
status = bundleContext_getService(driver->context, reference, (void **)&device_service);
if (status == CELIX_SUCCESS) {
refining_driver_device_pt refiningDevice = NULL;
status = refiningDriver_createDevice(driver, reference, device_service, &refiningDevice);
if (status == CELIX_SUCCESS) {
driver->deviceCount+=1;
char *serial;
asprintf(&serial, "%4i", driver->deviceCount);
status = refiningDriver_registerDevice(driver, refiningDevice, serial);
status = refiningDriver_registerDevice(driver, refiningDevice, serial);
free(serial);
}
}
return status;
}
}
return status;
}

celix_status_t refiningDriver_match(void *driverHandler, service_reference_pt reference, int *value) {
printf("REFINING_DRIVER: match called\n");
int match = 0;
celix_status_t status = CELIX_SUCCESS;
printf("REFINING_DRIVER: match called\n");
int match = 0;
celix_status_t status = CELIX_SUCCESS;

const char* category = NULL;
status = serviceReference_getProperty(reference, OSGI_DEVICEACCESS_DEVICE_CATEGORY, &category);
@@ -221,8 +221,8 @@ celix_status_t refiningDriver_match(void *driverHandler, service_reference_pt re
}
}

(*value) = match;
return status;
(*value) = match;
return status;
}

celix_status_t refiningDriverDevice_createService(refining_driver_device_pt device, refining_driver_device_service_pt *service) {

0 comments on commit a7412f9

Please sign in to comment.