+ ob_debug_type(OB_DEBUG_SM, "Comparing client against saved state: \n");
+ ob_debug_type(OB_DEBUG_SM, " client id: %s \n", c->sm_client_id);
+ ob_debug_type(OB_DEBUG_SM, " client name: %s \n", c->name);
+ ob_debug_type(OB_DEBUG_SM, " client class: %s \n", c->class);
+ ob_debug_type(OB_DEBUG_SM, " client role: %s \n", c->role);
+ ob_debug_type(OB_DEBUG_SM, " client command: %s \n",
+ c->wm_command ? c->wm_command : "(null)");
+ ob_debug_type(OB_DEBUG_SM, " state id: %s \n", s->id);
+ ob_debug_type(OB_DEBUG_SM, " state name: %s \n", s->name);
+ ob_debug_type(OB_DEBUG_SM, " state class: %s \n", s->class);
+ ob_debug_type(OB_DEBUG_SM, " state role: %s \n", s->role);
+ ob_debug_type(OB_DEBUG_SM, " state command: %s \n",
+ s->command ? s->command : "(null)");
+
+ if ((c->sm_client_id && s->id && !strcmp(c->sm_client_id, s->id)) ||
+ (c->wm_command && s->command && !strcmp(c->wm_command, s->command)))
+ {
+ return (!strcmp(s->name, c->name) &&
+ !strcmp(s->class, c->class) &&
+ !strcmp(s->role, c->role));