aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-01-15 19:15:11 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-01-15 19:15:11 +0000
commite156f8cceb6186d03b836b14dc308e8ff0bba16e (patch)
treeee9aae97e217770662fe3237a145d303dad1ed43 /src/vpn
parent9555e79edd6a50c572dd3c8cd227937010c4830e (diff)
downloadgnunet-e156f8cceb6186d03b836b14dc308e8ff0bba16e.tar.gz
gnunet-e156f8cceb6186d03b836b14dc308e8ff0bba16e.zip
more bug fixing
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-helper-vpn-windows.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vpn/gnunet-helper-vpn-windows.c b/src/vpn/gnunet-helper-vpn-windows.c
index 4cc2794c2..2fe039107 100644
--- a/src/vpn/gnunet-helper-vpn-windows.c
+++ b/src/vpn/gnunet-helper-vpn-windows.c
@@ -513,7 +513,7 @@ resolve_interface_name ()
513 char adaptername_name[] = "Name"; 513 char adaptername_name[] = "Name";
514 DWORD data_type; 514 DWORD data_type;
515 515
516 len = sizeof (adapter_key_handle); 516 len = 256 * sizeof(char);
517 /* optain a subkey of {4D36E972-E325-11CE-BFC1-08002BE10318} */ 517 /* optain a subkey of {4D36E972-E325-11CE-BFC1-08002BE10318} */
518 status = RegEnumKeyExA ( 518 status = RegEnumKeyExA (
519 adapter_key_handle, 519 adapter_key_handle,
@@ -524,7 +524,7 @@ resolve_interface_name ()
524 NULL, 524 NULL,
525 NULL, 525 NULL,
526 NULL); 526 NULL);
527 527
528 /* this may fail due to one of two reasons: 528 /* this may fail due to one of two reasons:
529 * we are at the end of the list*/ 529 * we are at the end of the list*/
530 if (ERROR_NO_MORE_ITEMS == status) 530 if (ERROR_NO_MORE_ITEMS == status)
@@ -532,7 +532,7 @@ resolve_interface_name ()
532 // * we found a broken registry key, continue with the next key. 532 // * we found a broken registry key, continue with the next key.
533 if (ERROR_SUCCESS != status) 533 if (ERROR_SUCCESS != status)
534 goto cleanup; 534 goto cleanup;
535 535
536 /* prepare our new query string: */ 536 /* prepare our new query string: */
537 snprintf (query_key, 256, "%s\\%s\\Connection", 537 snprintf (query_key, 256, "%s\\%s\\Connection",
538 INTERFACE_REGISTRY_LOCATION, 538 INTERFACE_REGISTRY_LOCATION,
@@ -547,7 +547,7 @@ resolve_interface_name ()
547 &instance_key_handle); 547 &instance_key_handle);
548 548
549 if (status != ERROR_SUCCESS) 549 if (status != ERROR_SUCCESS)
550 continue; 550 goto cleanup;
551 551
552 /* now, read our PnpInstanceID */ 552 /* now, read our PnpInstanceID */
553 len = sizeof (pnpinstanceid_value); 553 len = sizeof (pnpinstanceid_value);
@@ -585,15 +585,15 @@ resolve_interface_name ()
585 585
586 strncpy (device_guid, instance_key, 256); 586 strncpy (device_guid, instance_key, 256);
587 retval = TRUE; 587 retval = TRUE;
588 588
589cleanup: 589cleanup:
590 RegCloseKey (instance_key_handle); 590 RegCloseKey (instance_key_handle);
591 591
592 ++i; 592 ++i;
593 } 593 }
594 594
595 RegCloseKey (adapter_key_handle); 595 RegCloseKey (adapter_key_handle);
596 596
597 return retval; 597 return retval;
598} 598}
599 599
@@ -1149,7 +1149,7 @@ main (int argc, char **argv)
1149 set_address4 (address, mask); 1149 set_address4 (address, mask);
1150 } 1150 }
1151 1151
1152 //run (handle); 1152 run (handle);
1153 global_ret = 0; 1153 global_ret = 0;
1154cleanup: 1154cleanup:
1155 remove_interface (); 1155 remove_interface ();