Open Source Telephony
 help / color / mirror / Atom feed
From: ppessi@gmail.com
To: ofono@ofono.org
Subject: [PATCH 3/7] Number of barring services is constant.
Date: Thu, 18 Mar 2010 16:44:27 +0200	[thread overview]
Message-ID: <1268923471-29059-3-git-send-email-ppessi@gmail.com> (raw)
In-Reply-To: <1268923471-29059-2-git-send-email-ppessi@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>


Signed-off-by: Pekka Pessi <Pekka.Pessi@nokia.com>
---
 src/call-barring.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/call-barring.c b/src/call-barring.c
index 530d64b..eedb41d 100644
--- a/src/call-barring.c
+++ b/src/call-barring.c
@@ -37,6 +37,7 @@
 #include "common.h"
 
 #define CALL_BARRING_FLAG_CACHED 0x1
+#define NUM_OF_BARRINGS 5
 
 static GSList *g_drivers = NULL;
 
@@ -47,8 +48,8 @@ static void set_query_next_lock(struct ofono_call_barring *cb);
 struct ofono_call_barring {
 	int flags;
 	DBusMessage *pending;
-	int *cur_locks;
-	int *new_locks;
+	int cur_locks[NUM_OF_BARRINGS];
+	int new_locks[NUM_OF_BARRINGS];
 	int query_start;
 	int query_end;
 	int query_next;
@@ -1070,9 +1071,6 @@ static void call_barring_remove(struct ofono_atom *atom)
 	if (cb->driver && cb->driver->remove)
 		cb->driver->remove(cb);
 
-	g_free(cb->cur_locks);
-	g_free(cb->new_locks);
-
 	g_free(cb);
 }
 
@@ -1083,7 +1081,6 @@ struct ofono_call_barring *ofono_call_barring_create(struct ofono_modem *modem,
 {
 	struct ofono_call_barring *cb;
 	GSList *l;
-	int lcount;
 
 	if (driver == NULL)
 		return NULL;
@@ -1093,10 +1090,6 @@ struct ofono_call_barring *ofono_call_barring_create(struct ofono_modem *modem,
 	if (cb == NULL)
 		return NULL;
 
-	lcount = CB_ALL_END - CB_ALL_START + 1;
-
-	cb->cur_locks = g_new0(int, lcount);
-	cb->new_locks = g_new0(int, lcount);
 	cb->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_CALL_BARRING,
 						call_barring_remove, cb);
 
-- 
1.6.3.3


  reply	other threads:[~2010-03-18 14:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 14:44 [PATCH 1/7] Barring services can only be activated/deactivated ppessi
2010-03-18 14:44 ` [PATCH 2/7] Return newly-queried barring status ppessi
2010-03-18 14:44   ` ppessi [this message]
2010-03-18 14:44     ` [PATCH 4/7] Network password has exactly 4 digits ppessi
2010-03-18 14:44       ` [PATCH 5/7] Interrogation of a barring does not require password ppessi
2010-03-18 14:44         ` [PATCH 6/7] Added call-barring-api.txt ppessi
2010-03-18 14:44           ` [PATCH 7/7] Fix: isimodem handling of call barring services ppessi
2010-03-18 16:51             ` Denis Kenzior
2010-03-18 17:38               ` Pekka Pessi
2010-03-18 17:50                 ` Denis Kenzior
2010-03-18 16:46           ` [PATCH 6/7] Added call-barring-api.txt Denis Kenzior
2010-03-18 16:44         ` [PATCH 5/7] Interrogation of a barring does not require password Denis Kenzior
2010-03-18 16:43       ` [PATCH 4/7] Network password has exactly 4 digits Denis Kenzior
2010-03-19 14:36         ` Pekka Pessi
2010-03-18 16:40     ` [PATCH 3/7] Number of barring services is constant Denis Kenzior
2010-03-18 16:39   ` [PATCH 2/7] Return newly-queried barring status Denis Kenzior
2010-03-18 16:11 ` [PATCH 1/7] Barring services can only be activated/deactivated Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1268923471-29059-3-git-send-email-ppessi@gmail.com \
    --to=ppessi@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox