Skip to content

Commit

Permalink
Merge pull request #38 from tsirakisn/fix_xcpmd_bug
Browse files Browse the repository at this point in the history
Fix xcpmd crash on reboot
  • Loading branch information
rossphilipson authored Feb 21, 2017
2 parents a4fe92a + f9cc112 commit e82331d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions xcpmd/src/vm-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ struct vm_identifier_table_row * new_vmid_search_result_by_name(char * name) {

if (vm_identifier_table == NULL) {
populate_vm_identifier_table();

if (vm_identifier_table == NULL) {
xcpmd_log(LOG_WARNING, "Vm identifier table could not be populated. Exiting search.");
return NULL;
}
}

unsigned int i;
Expand All @@ -181,6 +186,11 @@ struct vm_identifier_table_row * new_vmid_search_result_by_uuid(char * uuid) {

if (vm_identifier_table == NULL) {
populate_vm_identifier_table();

if (vm_identifier_table == NULL) {
xcpmd_log(LOG_WARNING, "Vm identifier table could not be populated. Exiting search.");
return NULL;
}
}

for (i=0; i < vm_identifier_table->num_entries; ++i) {
Expand All @@ -205,6 +215,11 @@ struct vm_identifier_table_row * new_vmid_search_result_by_path(char * path) {

if (vm_identifier_table == NULL) {
populate_vm_identifier_table();

if (vm_identifier_table == NULL) {
xcpmd_log(LOG_WARNING, "Vm identifier table could not be populated. Exiting search.");
return NULL;
}
}

for (i=0; i < vm_identifier_table->num_entries; ++i) {
Expand Down

0 comments on commit e82331d

Please sign in to comment.