Hi Aki, > Anyway, here it is. Please test; seems to work for me on my N95.
+static void extract_mcc_mnc(const char *str, char *mcc, char *mnc) { - int num = 0; - unsigned int i; - /* Three digit country code */ - for (i = 0; i < 3; i++) - num = num * 10 + (int)(str[i] - '0'); - - *mcc = num; - - num = 0; + strncpy(mcc, str, sizeof(mcc)); + mcc[3] = '\0'; maybe I am blind, but how is this suppose to work. The sizeof(mmc) is 1 byte. Regards Marcel _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono