aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-protocol2.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-16 22:52:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-16 22:52:55 +0000
commitcc6a90e4afbc0e7d2c5959203814a95fa9eb1123 (patch)
tree48a237c916075018093e9ecb7bb7cd09f81f77d7 /src/interfaces/libpq/fe-protocol2.c
parentb3d58ea7ec6df499a46baa4327ea400746199fc5 (diff)
downloadpostgresql-cc6a90e4afbc0e7d2c5959203814a95fa9eb1123.tar.gz
postgresql-cc6a90e4afbc0e7d2c5959203814a95fa9eb1123.zip
Remove dllist.c from libpq. It's overkill for what libpq needs; we can
just stick a list-link into struct PGnotify instead. Result is a smaller faster and more robust library (mainly because we reduce the number of malloc's and free's involved in notify processing), plus less pollution of application link-symbol namespace.
Diffstat (limited to 'src/interfaces/libpq/fe-protocol2.c')
-rw-r--r--src/interfaces/libpq/fe-protocol2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c
index aeb5e0faf03..8d87a2af0dd 100644
--- a/src/interfaces/libpq/fe-protocol2.c
+++ b/src/interfaces/libpq/fe-protocol2.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.14 2004/08/30 02:54:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.15 2004/10/16 22:52:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -937,7 +937,12 @@ getNotify(PGconn *conn)
/* fake up an empty-string extra field */
newNotify->extra = newNotify->relname + nmlen;
newNotify->be_pid = be_pid;
- DLAddTail(conn->notifyList, DLNewElem(newNotify));
+ newNotify->next = NULL;
+ if (conn->notifyTail)
+ conn->notifyTail->next = newNotify;
+ else
+ conn->notifyHead = newNotify;
+ conn->notifyTail = newNotify;
}
return 0;