vacman_controller 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a82c1e1da792a6d845ed3fa39e2ad0a7f24dc022
4
- data.tar.gz: df608d69585f838e1d1591fc2c4ba1c6496e61ed
3
+ metadata.gz: 92b34885a3a724c1c9d8add45e77e7e353a1c175
4
+ data.tar.gz: 0dc4ab2d9c9b49eceb24fd0bd24997470905ca98
5
5
  SHA512:
6
- metadata.gz: f6348405cfdec6d7cdb5450625d9b8bdb5f08c034f0a93d7f27884f03f91560152b8e16d92195abfb157f896ce654dc3fef6463ff0e0d77184552cc206c20e29
7
- data.tar.gz: 3a023343b469676f06956f1e14ec7dfc63301e397ea66ac50e827199dd97b293b65e73640607ef23ea51cb9c1350b88c2eb244f6bb4e0246e21287d816f7460b
6
+ metadata.gz: 882fb127b512ba307f48fdfd59910f8016291554fe24e6899daf5a6584e474eb802434b9e448dc295573cc582146b03e1166b6b3827e277fae5fc15ae8cc95e8
7
+ data.tar.gz: 681c13bec4ff4452a3720ee5a069232de829776449f7587acacd7781027932bf4c45ee7a885d554a87cb403f2e16c23e3425740047b66b34c248379be571b37d
@@ -13,7 +13,7 @@ else
13
13
  exit 1
14
14
  end
15
15
 
16
- append_cflags "-I#{VACMAN_CONTROLLER}/include -Wall"
16
+ append_cflags "-I#{VACMAN_CONTROLLER}/include -Wall -std=c99 -Wno-declaration-after-statement"
17
17
  append_ldflags "-L#{VACMAN_CONTROLLER}/lib -laal2sdk -Wl,-rpath #{VACMAN_CONTROLLER}/lib"
18
18
 
19
19
  if find_library('aal2sdk', 'AAL2DPXInit', "#{VACMAN_CONTROLLER}/lib")
@@ -8,7 +8,7 @@ TKernelParms KernelParms; // Kernel Params
8
8
  /*
9
9
  * raise an error and tell wich method failed with wich error code
10
10
  */
11
- static void vacman_raise_error(char* method, int error_code) {
11
+ static void vacman_raise_error(const char* method, int error_code) {
12
12
  aat_ascii error_message[100];
13
13
  AAL2GetErrorMsg (error_code, error_message);
14
14
  rb_raise(e_vacmanerror, "%s error %d: %s", method, error_code, error_message);
@@ -19,14 +19,14 @@ static void vacman_raise_error(char* method, int error_code) {
19
19
  * convert a ruby hash to TDigipassBlob structure
20
20
  */
21
21
  static void rbhash_to_digipass(VALUE token, TDigipassBlob* dpdata) {
22
- memset(dpdata, 0, sizeof(*dpdata));
23
-
24
22
  VALUE blob = rb_hash_aref(token, rb_str_new2("blob"));
25
23
  VALUE serial = rb_hash_aref(token, rb_str_new2("serial"));
26
24
  VALUE app_name = rb_hash_aref(token, rb_str_new2("app_name"));
27
25
  VALUE flag1 = rb_hash_aref(token, rb_str_new2("flags1"));
28
26
  VALUE flag2 = rb_hash_aref(token, rb_str_new2("flags2"));
29
27
 
28
+ memset(dpdata, 0, sizeof(*dpdata));
29
+
30
30
  strcpy(dpdata->Blob, rb_string_value_cstr(&blob));
31
31
  strncpy(dpdata->Serial, rb_string_value_cstr(&serial), sizeof(dpdata->Serial));
32
32
  strncpy(dpdata->AppName, rb_string_value_cstr(&app_name), sizeof(dpdata->AppName));
@@ -111,7 +111,7 @@ static VALUE vacman_generate_password(VALUE module, VALUE token) {
111
111
  * Properties names and IDs registry
112
112
  */
113
113
  struct token_property {
114
- char *name;
114
+ const char *name;
115
115
  aat_int32 id;
116
116
  };
117
117
  static struct token_property token_properties[] = {
@@ -165,7 +165,7 @@ static size_t properties_count = sizeof(token_properties)/sizeof(struct token_pr
165
165
  * Convert property name to property ID
166
166
  */
167
167
  static long vacman_get_property_id(char *property_name) {
168
- for (int i = 0; i < properties_count; i++) {
168
+ for (size_t i = 0; i < properties_count; i++) {
169
169
  if (strcmp(property_name, token_properties[i].name) == 0) {
170
170
  return token_properties[i].id;
171
171
  }
@@ -300,7 +300,7 @@ static VALUE vacman_import(VALUE module, VALUE filename, VALUE key) {
300
300
  }
301
301
 
302
302
  struct kernel_property {
303
- char *name;
303
+ const char *name;
304
304
  aat_int32 *value;
305
305
  aat_int32 deflt;
306
306
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vacman_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Lankenau
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-04 00:00:00.000000000 Z
12
+ date: 2019-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler