OSSP CVS Repository

ossp - Check-in [4750]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4750
Date: 2004-Oct-18 21:35:45 (local)
2004-Oct-18 19:35:45 (UTC)
User:rse
Branch:
Comment: Do not break in pth_msgport_find() if a message port was created with a NULL name.
Tickets:
Inspections:
Files:
ossp-pkg/pth/ChangeLog      1.627 -> 1.628     4 inserted, 0 deleted
ossp-pkg/pth/pth_msg.c      1.27 -> 1.28     4 inserted, 3 deleted

ossp-pkg/pth/ChangeLog 1.627 -> 1.628

--- ChangeLog    2004/10/14 14:42:34     1.627
+++ ChangeLog    2004/10/18 19:35:45     1.628
@@ -21,6 +21,10 @@
                   
   Changes between 2.0.2 and 2.0.3 (12-Sep-2004 to xx-xxx-2004)
 
+   *) Do not break in pth_msgport_find() if a message port
+      was created with a NULL name.
+      [Ralf S. Engelschall]
+
    *) Better error checking in pth_key_xxx() functions.
       [Ralf S. Engelschall]
 


ossp-pkg/pth/pth_msg.c 1.27 -> 1.28

--- pth_msg.c    2004/07/13 10:50:49     1.27
+++ pth_msg.c    2004/10/18 19:35:45     1.28
@@ -97,8 +97,9 @@
     /* iterate over message ports */
     mp = mpf = (pth_msgport_t)pth_ring_first(&pth_msgport);
     while (mp != NULL) {
-        if (strcmp(mp->mp_name, name) == 0)
-            break;
+        if (mp->mp_name != NULL)
+            if (strcmp(mp->mp_name, name) == 0)
+                break;
         mp = (pth_msgport_t)pth_ring_next(&pth_msgport, (pth_ringnode_t *)mp);
         if (mp == mpf) {
             mp = NULL;
@@ -108,7 +109,7 @@
     return mp;
 }
 
-/* number of message on a port */
+/* number of messages on a port */
 int pth_msgport_pending(pth_msgport_t mp)
 {
     if (mp == NULL)

CVSTrac 2.0.1