[gdm/rstrode/wip/list-extension: 1/5] session-worker: rename response_text to response
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/rstrode/wip/list-extension: 1/5] session-worker: rename response_text to response
- Date: Tue, 25 Jul 2017 11:57:42 +0000 (UTC)
commit 13835cd1dfcc3f4788f9e2978ae45db4154d4c95
Author: Ray Strode <rstrode redhat com>
Date: Fri Jul 14 11:01:13 2017 -0400
session-worker: rename response_text to response
Right now we always give text responses back to pam modules,
so the response variable is named response_text. That's going
to change in the future, when we introduce private protocol for
the module to talk to GDM.
As prep work for that change, rename "response_text" to "response".
daemon/gdm-session-worker.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index c4d21ec..9342352 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -550,15 +550,15 @@ convert_to_utf8 (const char *str)
static gboolean
gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
const struct pam_message *query,
- char **response_text)
+ char **response)
{
char *user_answer;
gboolean res;
char *utf8_msg;
char *msg;
- if (response_text != NULL) {
- *response_text = NULL;
+ if (response != NULL) {
+ *response = NULL;
}
gdm_session_worker_update_username (worker);
@@ -611,8 +611,8 @@ gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
* instead of g_malloc'd memory. PAM_MAX_RESP_SIZE includes
* the '\0' terminating character, thus the "- 1".
*/
- if (res && response_text != NULL) {
- *response_text = strndup (user_answer, PAM_MAX_RESP_SIZE - 1);
+ if (res && response != NULL) {
+ *response = strndup (user_answer, PAM_MAX_RESP_SIZE - 1);
}
memset (user_answer, '\0', strlen (user_answer));
@@ -681,17 +681,17 @@ gdm_session_worker_pam_new_messages_handler (int number_o
sizeof (struct pam_response));
for (i = 0; i < number_of_messages; i++) {
gboolean got_response;
- char *response_text;
+ char *response;
- response_text = NULL;
+ response = NULL;
got_response = gdm_session_worker_process_pam_message (worker,
messages[i],
- &response_text);
+ &response);
if (!got_response) {
goto out;
}
- replies[i].resp = response_text;
+ replies[i].resp = response;
replies[i].resp_retcode = PAM_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]