- char *errormsg = "Session not connected";
- *(short *)(data->response + 2) = ntohs(PKT_RESP_ERROR);
- sprintf((data->response + data->response_length), "%s", errormsg);
- data->response_length += strlen(errormsg) + 1;
+ if (flag)
+ session = p->get_session_by_username(data->argv[1]);
+ else
+ session = 0; // can't ungarden by username
+ }
+
+ if (session)
+ s = p->get_session_by_id(session);