Activate modes error

Bug #163018 reported by powerwolf
4
Affects Status Importance Assigned to Milestone
Power Policy Manager
Fix Released
High
mabbas

Bug Description

In the file daemon/policy.c: activate_mode(), the following codes to find the proper mode to be activated:

509 while(list) {
510 mode = list->data;
511 list = g_list_next(list);
512 if (((strcmp(name, mode->name) == 0) && !mode->active)) {
513 mode->active = 1;
514 PRINTF("Mode %s activated\n", mode->name);
515 break;
516 }
517 }
518
519 if (mode) {
520 list = g_list_first(mode->layers);
521 while (list) {
522 layer = list->data;
523 list = g_list_next(list);
524 activate_layer(layer->layer_name);
525 }
526 }
527 }

But, in fact the last mode will always be activated, because if we can not find any mode the pointer mode will refer to the last one.

Zhao Fan (fan-zhao)
Changed in ppm:
assignee: nobody → mohamed-abbas
importance: Undecided → High
mabbas (mohamed-abbas)
Changed in ppm:
status: New → Triaged
Zhao Fan (fan-zhao)
Changed in ppm:
milestone: none → m8
Revision history for this message
mabbas (mohamed-abbas) wrote :

commited changes to fix this bug

Changed in ppm:
status: Triaged → Fix Committed
Revision history for this message
Zhao Fan (fan-zhao) wrote :

Mohamed and Rusty, could you guys update the ppm package for moblin to sync up the status of ppm source repository and ppm package in moblin so that this bug could be verified with moblin image we created? Thanks!

Zhao Fan (fan-zhao)
Changed in ppm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.