session: Fix allowed_bearers initialization
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 12 Apr 2011 13:27:43 +0000 (15:27 +0200)
src/session.c

index d681d72ba32be067151cfd459860ed217109e4e1..b07749e1695f281b23597d32cd930fd29bb23332 100644 (file)
@@ -970,13 +970,15 @@ int __connman_session_create(DBusMessage *msg)
        session->ecall = ecall;
        session->roaming_policy = roaming_policy;
 
-       if (session->allowed_bearers == NULL) {
+       if (allowed_bearers == NULL) {
                session->allowed_bearers = session_allowed_bearers_any();
 
                if (session->allowed_bearers == NULL) {
                        err = -ENOMEM;
                        goto err;
                }
+       } else {
+               session->allowed_bearers = allowed_bearers;
        }
 
        session->service_list = NULL;