From: Pekka Pessi <[email protected]>

---
 drivers/isimodem/call-forwarding.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/isimodem/call-forwarding.c 
b/drivers/isimodem/call-forwarding.c
index 2fafb26..89a03dc 100644
--- a/drivers/isimodem/call-forwarding.c
+++ b/drivers/isimodem/call-forwarding.c
@@ -143,6 +143,14 @@ static gboolean 
decode_gsm_forwarding_info(GIsiSubBlockIter *parent,
                                                        info->numlen * 2,
                                                        2 + len))
                                return FALSE;
+
+                       if (number)
+                               *number = tag;
+                       else
+                               g_free(tag);
+               } else {
+                       if (number)
+                               *number = g_strdup("");
                }
 
                if (status)
@@ -154,11 +162,6 @@ static gboolean 
decode_gsm_forwarding_info(GIsiSubBlockIter *parent,
                if (noreply)
                        *noreply = info->noreply;
 
-               if (number)
-                       *number = tag;
-               else
-                       g_free(tag);
-
                return TRUE;
        }
        return FALSE;
-- 
1.7.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to