Author: rfm
Date: Thu Jun 23 16:52:36 2016
New Revision: 39911

URL: http://svn.gna.org/viewcvs/gnustep?rev=39911&view=rev
Log:
improve debug

Modified:
    libs/sqlclient/trunk/Postgres.m

Modified: libs/sqlclient/trunk/Postgres.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/Postgres.m?rev=39911&r1=39910&r2=39911&view=diff
==============================================================================
--- libs/sqlclient/trunk/Postgres.m     (original)
+++ libs/sqlclient/trunk/Postgres.m     Thu Jun 23 16:52:36 2016
@@ -561,7 +561,7 @@
   [nq enqueueNotification: n postingStyle: NSPostASAP];
 }
 
-- (void) _checkNotifications
+- (void) _checkNotifications: (BOOL)async
 {
   PGnotify      *notify;
 
@@ -612,6 +612,17 @@
           [name release];
           [userInfo release];
 
+         if ([self debugging] > 0)
+           {
+              if (YES == async)
+                {
+                  [self debug: @"Notified (asynchronously): %@", n];
+                }
+              else
+                {
+                  [self debug: @"Notified (query/execute): %@", n];
+                }
+           }
           [self performSelectorOnMainThread: @selector(_postNotification:)
                                  withObject: n
                               waitUntilDone: NO];
@@ -724,7 +735,7 @@
     {
       PQclear(result);
     }
-  [self _checkNotifications];
+  [self _checkNotifications: NO];
   [arp release];
   return rowCount;
 }
@@ -1213,7 +1224,7 @@
     {
       PQclear(result);
     }
-  [self _checkNotifications];
+  [self _checkNotifications: NO];
   return [records autorelease];
 }
 
@@ -1685,7 +1696,7 @@
   if (0 != connection)
     {
       PQconsumeInput(connection);
-      [self _checkNotifications];
+      [self _checkNotifications: YES];
     }
 }
 @end


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to