]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_pubsub/mod_pubsub.erl: Now possible to subscribe to a
authorAlexey Shchepin <alexey@process-one.net>
Wed, 18 May 2005 23:47:33 +0000 (23:47 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Wed, 18 May 2005 23:47:33 +0000 (23:47 +0000)
pubsub node with a JID that includes a resource (thanks to Martijn
van Beers)

* src/stringprep/uni_parse2.tcl: Bugfix
* src/stringprep/stringprep_drv.c: Likewise
* src/stringprep/uni_norm.c: Regenerated

SVN Revision: 350

ChangeLog
src/mod_pubsub/mod_pubsub.erl
src/stringprep/stringprep_drv.c
src/stringprep/uni_norm.c
src/stringprep/uni_parse2.tcl

index cd31b4c1b0da10c7593cff617ca0643f56f23462..f05604222fd37456f88073b58858dd82c202cf90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-19  Alexey Shchepin  <alexey@sevcom.net>
+
+       * src/mod_pubsub/mod_pubsub.erl: Now possible to subscribe to a
+       pubsub node with a JID that includes a resource (thanks to Martijn
+       van Beers)
+
+       * src/stringprep/uni_parse2.tcl: Bugfix
+       * src/stringprep/stringprep_drv.c: Likewise
+       * src/stringprep/uni_norm.c: Regenerated
+
 2005-05-18  Alexey Shchepin  <alexey@sevcom.net>
 
        * src/mod_irc/mod_irc_connection.erl: Added support for WHOIS
index a696709093d112949d41f0f435e73ee58b7b2831..6d422791d437041bfe26f270459625df4b71e99e 100644 (file)
@@ -608,6 +608,7 @@ subscribe_node(Host, From, JID, Node) ->
                J
        end,
     Subscriber = jlib:jid_tolower(SubscriberJID),
+    SubscriberWithoutResource = jlib:jid_remove_resource(Subscriber),
     F = fun() ->
                case mnesia:read({pubsub_node, {Host, Node}}) of
                    [#pubsub_node{info = Info} = N] ->
@@ -627,7 +628,7 @@ subscribe_node(Host, From, JID, Node) ->
                end
        end,
     if
-       Sender == Subscriber ->
+       Sender == SubscriberWithoutResource ->
            case mnesia:transaction(F) of
                {atomic, {error, _} = Error} ->
                    Error;
index 047ca2041eed1a7cde5ee1d441c1780b033b7c17..a12ec9a8ed656d872437e83c0d35c1c00f0dda66 100644 (file)
@@ -90,23 +90,21 @@ static int compose(int ch1, int ch2)
    }
 
    info1 = GetUniCharCompInfo(ch1);
-   if (info1 != -1) {
-      if (info1 & CompSingleMask) {
-        if (ch2 == compFirstList[info1 & CompMask][0]) {
-           return compFirstList[info1 & CompMask][1];
-        } else
-           return 0;
-      }
+   if (info1 != -1 && info1 & CompSingleMask) {
+      if (!(info1 & CompSecondMask) &&
+         ch2 == compFirstList[info1 & CompMask][0]) {
+        return compFirstList[info1 & CompMask][1];
+      } else
+        return 0;
    }
 
    info2 = GetUniCharCompInfo(ch2);
-   if (info2 != -1) {
-      if (info2 & CompSingleMask) {
-        if (ch1 == compSecondList[info2 & CompMask][0]) {
-           return compSecondList[info2 & CompMask][1];
-        } else
-           return 0;
-      }
+   if (info2 != -1 && info2 & CompSingleMask) {
+      if ((info2 & CompSecondMask) &&
+         ch1 == compSecondList[info2 & CompMask][0]) {
+        return compSecondList[info2 & CompMask][1];
+      } else
+        return 0;
    }
 
    if (info1 != -1 && info2 != -1 &&
index 4f07fd8a93eb38367c0c605240082a51b6ee2fc0..7575f14051a96d4a343bac6f89cb81279e0d9342 100644 (file)
@@ -2420,7 +2420,7 @@ static int compGroupMap[] = {
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    65733, -1, 65657, -1, -1, -1, -1, -1, -1, -1, -1, 65546, 131108, 65547
+    65733, -1, 65657, -1, -1, -1, -1, -1, -1, -1, -1, 196618, 131108, 196619
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
@@ -2442,30 +2442,30 @@ static int compGroupMap[] = {
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, 65539, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65540
+    -1, -1, -1, -1, -1, -1, -1, 196611, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 196612
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    65541, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, 65542, 65543, -1, -1, -1, -1, -1, -1, 
+    196613, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, 196614, 196615, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, 65577, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, 65577, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131105, -1, -1, -1, 
-    -1, -1, -1, -1, 98, 65584, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, 131106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131105, -1, -1, 
+    -1, -1, -1, -1, -1, 98, 65584, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, 131106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65578, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65578, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
@@ -2473,28 +2473,28 @@ static int compGroupMap[] = {
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, 65716, -1, -1, 65544, -1, -1, -1, 127, -1, -1, -1, 65630, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, 131107, 65545, -1, -1, -1, -1, -1, 
+    -1, 65716, -1, -1, 196616, -1, -1, -1, 127, -1, -1, -1, 65630, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, 131107, 196617, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131096, -1, -1, 
-    -1, -1, -1, -1, -1, 19, 65695, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, 65538, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131096, -1, 
+    -1, -1, -1, -1, -1, -1, 19, 65695, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, 196610, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, 131081, -1, -1, -1, -1, 65536, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, 3, -1, -1, 65538, -1, -1, 65537, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, 131081, -1, -1, -1, -1, 196608, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, 3, -1, -1, 65538, -1, -1, 196609, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65616, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65616, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
@@ -2510,26 +2510,26 @@ static int compGroupMap[] = {
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65679, 65557, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65679, 
+    65557, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, 65685, 65561, -1, -1, -1, -1, -1, -1, 65743, 65601, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    65685, 65561, -1, -1, -1, -1, -1, -1, 65743, 65601, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, 114, 25, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65673, 65553, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, 114, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65673, 65553, -1, -1, 
-    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65540, 
-    65605, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, 65540, 65605, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-    -1, 82, 134, 65591, 65692, 65693, 65565, 65641, 65739, 58, 116, 65568, 
-    65652, 65543, 65609, 65610, 65710, 36, 92, -1, -1, -1, -1, -1, -1, 
-    9, 73, -1, -1, -1, -1, -1, -1, 53, 108, 65690, 65563, 65639, 65737
-    65598, 65700, 27, 88, 65541, 65606, 65607, 65709, 65572, 65667, 11
-    69, -1, -1, -1, -1, -1, -1, 126, 45, -1, -1, -1, -1, -1, -1, 13, 78
-    -1, -1, -1, -1, -1, -1, 55, 112, -1, -1, -1, -1, -1, -1, 29, 90, -1
-    -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, 128, 46, 65683, 
+    -1, -1, -1, 82, 134, 65591, 65692, 65693, 65565, 65641, 65739, 58, 
+    116, 65568, 65652, 65543, 65609, 65610, 65710, 36, 92, -1, -1, -1, 
+    -1, -1, -1, 9, 73, -1, -1, -1, -1, -1, -1, 53, 108, 65690, 65563, 65639
+    65737, 65598, 65700, 27, 88, 65541, 65606, 65607, 65709, 65572, 65667
+    11, 69, -1, -1, -1, -1, -1, -1, 126, 45, -1, -1, -1, -1, -1, -1, 13
+    78, -1, -1, -1, -1, -1, -1, 55, 112, -1, -1, -1, -1, -1, -1, 29, 90
+    -1, -1, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, 128, 46, 65683, 
     65560, 65635, 65732, 65592, 65694, 109, 21, 65642, 65740, 65599, 65702, 
     65569, 65653, 65544, -1, -1, -1, 65574, -1, -1, -1, -1, -1, -1, -1, 
     65552, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
index 0a40534ad8b03b0df447395c939b9b8515738c78..950090a096cb9252642a01734ce142f55a622b10 100644 (file)
@@ -261,7 +261,7 @@ proc uni::buildTables {} {
        } elseif {$comp_second($ch2) == 1 && ![info exists comp_first($ch2)]} {
            set i [llength $comp_second_list]
            lappend comp_second_list [list $ch1 $comp_map($comp)]
-           set comp_info_map($ch2) [expr {$i | (1 << 16)}]
+           set comp_info_map($ch2) [expr {$i | (1 << 16) | (1 << 17)}]
        } else {
            if {[lsearch -exact $comp_x_list $ch1] < 0} {
                set i [llength $comp_x_list]