Receive Who Am I can vary in length between versions

This commit is contained in:
Tomasz Moń
2009-05-04 17:39:46 +02:00
parent 20769ace01
commit b1a8d69dba

11
gdigi.c
View File

@@ -670,14 +670,11 @@ static gboolean request_who_am_i(unsigned char *device_id, unsigned char *family
GString *data = get_message_by_id(RECEIVE_WHO_AM_I); GString *data = get_message_by_id(RECEIVE_WHO_AM_I);
if (data != NULL) { if (data != NULL) {
if (data->len == 14) { *device_id = data->str[8];
*device_id = data->str[8]; *family_id = data->str[9];
*family_id = data->str[9]; *product_id = data->str[10];
*product_id = data->str[10];
g_string_free(data, TRUE);
return TRUE;
}
g_string_free(data, TRUE); g_string_free(data, TRUE);
return TRUE;
} }
return FALSE; return FALSE;
} }