~phablet-team/ofono/midori-support

« back to all changes in this revision

Viewing changes to gatchat/gatchat.c

  • Committer: Alfonso Sanchez-Beato
  • Date: 2015-09-28 08:10:59 UTC
  • mfrom: (6830.1.168)
  • mto: This revision was merged to the branch mainline in revision 6904.
  • Revision ID: alfonso.sanchez-beato@canonical.com-20150928081059-1o08e2a9pkit6ar6
* Update to upstream release 1.17
* Do not assert when the radio is unavailable (LP: #1490991)
* Fix crash when importing phonebook (LP: #1486004)
* Check only destination port when receiving push (LP: #1490673)
* Fix crash when retrying to close context (LP: #1492483)

Show diffs side-by-side

added added

removed removed

Lines of Context:
583
583
                return;
584
584
 
585
585
        /* Check for echo, this should not happen, but lets be paranoid */
586
 
        if (!strncmp(str, "AT", 2) == TRUE)
 
586
        if (!strncmp(str, "AT", 2))
587
587
                goto done;
588
588
 
589
589
        cmd = g_queue_peek_head(p->command_queue);
1135
1135
        return TRUE;
1136
1136
}
1137
1137
 
 
1138
static gpointer at_chat_get_userdata(struct at_chat *chat,
 
1139
                                                guint group, guint id)
 
1140
{
 
1141
        GList *l;
 
1142
        struct at_command *c;
 
1143
 
 
1144
        if (chat->command_queue == NULL)
 
1145
                return NULL;
 
1146
 
 
1147
        l = g_queue_find_custom(chat->command_queue, GUINT_TO_POINTER(id),
 
1148
                                at_command_compare_by_id);
 
1149
 
 
1150
        if (l == NULL)
 
1151
                return NULL;
 
1152
 
 
1153
        c = l->data;
 
1154
 
 
1155
        if (c->gid != group)
 
1156
                return NULL;
 
1157
 
 
1158
        return c->user_data;
 
1159
}
 
1160
 
1138
1161
static guint at_chat_register(struct at_chat *chat, guint group,
1139
1162
                                const char *prefix, GAtNotifyFunc func,
1140
1163
                                gboolean expect_pdu, gpointer user_data,
1540
1563
        return at_chat_cancel_group(chat->parent, chat->group);
1541
1564
}
1542
1565
 
 
1566
gpointer g_at_chat_get_userdata(GAtChat *chat, guint id)
 
1567
{
 
1568
        if (chat == NULL)
 
1569
                return NULL;
 
1570
 
 
1571
        return at_chat_get_userdata(chat->parent, chat->group, id);
 
1572
}
 
1573
 
1543
1574
guint g_at_chat_register(GAtChat *chat, const char *prefix,
1544
1575
                                GAtNotifyFunc func, gboolean expect_pdu,
1545
1576
                                gpointer user_data,