sstrncpy(vl->type, s.c_str(), sizeof(vl->type));
s = msg.plugin_instance();
- if (s.length())
- sstrncpy(vl->plugin_instance, s.c_str(), sizeof(vl->plugin_instance));
+ sstrncpy(vl->plugin_instance, s.c_str(), sizeof(vl->plugin_instance));
s = msg.type_instance();
- if (s.length())
- sstrncpy(vl->type_instance, s.c_str(), sizeof(vl->type_instance));
+ sstrncpy(vl->type_instance, s.c_str(), sizeof(vl->type_instance));
value_t *values = NULL;
size_t values_len = 0;
break;
default:
status = grpc::Status(grpc::StatusCode::INVALID_ARGUMENT,
- grpc::string("unkown value type"));
+ grpc::string("unknown value type"));
break;
}
}
}
- builder.RegisterAsyncService(&service_);
+ builder.RegisterService(&service_);
cq_ = builder.AddCompletionQueue();
server_ = builder.BuildAndStart();
} /* Start() */
server->Start();
for (i = 0; i < workers_num; i++) {
- pthread_create(&workers[i], /* attr = */ NULL,
+ plugin_thread_create(&workers[i], /* attr = */ NULL,
worker_thread, server);
}
INFO("grpc: Started %zu workers", workers_num);