session: Don't filter match all out
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 2 Nov 2012 16:26:18 +0000 (17:26 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 23 Nov 2012 12:47:24 +0000 (13:47 +0100)
If the user provides the match all rule we should add the policy
bearer to the result.

src/session.c

index 688237b..4bf7cfd 100644 (file)
@@ -465,6 +465,11 @@ static int filter_bearer(GSList *policy_bearers,
        for (it = policy_bearers; it != NULL; it = it->next) {
                policy = GPOINTER_TO_INT(it->data);
 
+               if (bearer == CONNMAN_SERVICE_TYPE_UNKNOWN) {
+                       bearer = policy;
+                       goto clone;
+               }
+
                if (policy != CONNMAN_SERVICE_TYPE_UNKNOWN && policy != bearer)
                        continue;