technology: Use allocated index for rfkill hash tables keys
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Oct 2010 16:01:31 +0000 (18:01 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 7 Oct 2010 18:07:43 +0000 (20:07 +0200)
src/technology.c

index b255236..a8f994b 100644 (file)
@@ -626,9 +626,9 @@ int __connman_technology_add_rfkill(unsigned int index,
        rfkill->softblock = softblock;
        rfkill->hardblock = hardblock;
 
-       g_hash_table_replace(rfkill_table, &index, technology);
+       g_hash_table_replace(rfkill_table, &rfkill->index, technology);
 
-       g_hash_table_replace(technology->rfkill_list, &index, rfkill);
+       g_hash_table_replace(technology->rfkill_list, &rfkill->index, rfkill);
 
        return 0;
 }