Rename variable to cmd_str.
authorBruce Momjian
Sat, 31 Dec 2005 19:39:11 +0000 (19:39 +0000)
committerBruce Momjian
Sat, 31 Dec 2005 19:39:11 +0000 (19:39 +0000)
src/backend/postmaster/pgstat.c
src/include/pgstat.h

index fa6b1f24fba0749a7c0326b00d5b155285b4dfc4..04d8890afd6bc0f4246518003dcd97489c578caa 100644 (file)
@@ -13,7 +13,7 @@
  *
  * Copyright (c) 2001-2005, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.114 2005/12/31 17:46:19 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.115 2005/12/31 19:39:10 momjian Exp $
  * ----------
  */
 #include "postgres.h"
@@ -777,7 +777,7 @@ pgstat_beshutdown_hook(int code, Datum arg)
  * ----------
  */
 void
-pgstat_report_activity(const char *stat_msg)
+pgstat_report_activity(const char *cmd_str)
 {
    PgStat_MsgActivity msg;
    int         len;
@@ -785,12 +785,12 @@ pgstat_report_activity(const char *stat_msg)
    if (!pgstat_collect_querystring || pgStatSock < 0)
        return;
 
-   len = strlen(stat_msg);
-   len = pg_mbcliplen(stat_msg, len, PGSTAT_ACTIVITY_SIZE - 1);
+   len = strlen(cmd_str);
+   len = pg_mbcliplen(cmd_str, len, PGSTAT_ACTIVITY_SIZE - 1);
 
-   memcpy(msg.m_stat_msg, stat_msg, len);
-   msg.m_stat_msg[len] = '\0';
-   len += offsetof(PgStat_MsgActivity, m_stat_msg) +1;
+   memcpy(msg.m_cmd_str, cmd_str, len);
+   msg.m_cmd_str[len] = '\0';
+   len += offsetof(PgStat_MsgActivity, m_cmd_str) + 1;
 
    pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_ACTIVITY);
    pgstat_send(&msg, len);
@@ -3015,7 +3015,7 @@ pgstat_recv_activity(PgStat_MsgActivity *msg, int len)
 
    entry = &(pgStatBeTable[msg->m_hdr.m_backendid - 1]);
 
-   StrNCpy(entry->activity, msg->m_stat_msg, PGSTAT_ACTIVITY_SIZE);
+   StrNCpy(entry->activity, msg->m_cmd_str, PGSTAT_ACTIVITY_SIZE);
 
    entry->activity_start_timestamp = GetCurrentTimestamp();
 }
index 3f1512f8a32c3d761f05fa0bdd6e867a3a112e8f..40ee8e763dfbf63e9ab95d40a5a4cd68699b2fe3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 2001-2005, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.39 2005/12/31 17:46:19 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.40 2005/12/31 19:39:11 momjian Exp $
  * ----------
  */
 #ifndef PGSTAT_H
@@ -179,7 +179,7 @@ typedef struct PgStat_MsgAnalyze
 typedef struct PgStat_MsgActivity
 {
    PgStat_MsgHdr m_hdr;
-   char        m_stat_msg[PGSTAT_ACTIVITY_SIZE];
+   char        m_cmd_str[PGSTAT_ACTIVITY_SIZE];
 } PgStat_MsgActivity;
 
 /* ----------