Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi
below is da code i used to get phone no, but its returning zero's, ihave added all priviliges needed..

char *device_no=NULL;
int tempbuf[10];
char* ptr=NULL
int i=0;
int result;

result = ISHELL_GetDeviceInfoEx(pMe->pIShell,AEE_DEVICEITEM_MDN,NULL, &i);
DBGPRINTF( "****Reading buffer ****%d- %d" , result,i);
device_no = (char*) MALLOC (i+1);
result=ISHELL_GetDeviceInfoEx(pMe-pIShell,AEE_DEVICEITEM_MDN,device_no,&i);
DBGPRINTF( "****Reading buffer ****%d" , result);
ptr = device_no;
MEMSET(tempbuf,0,10);
for(i=0;i<10;i++)
{
DBGPRINTF("device no is = %s",ptr);
tempbuf[i] = ATOI(ptr);
ptr++;
DBGPRINTF("temp buf is = %d",tempbuf[i]);

DBGPRINTF("temp buf value is = %d",tempbuf);

the point here is
1.the return value i get is success, no problem in it.
2 when i printed da string which i gt return value from deviceinfoex char by char it prints 0's
3. when i printed char by char after converting it into integer still i get 0's
4. but strange point is when i printed da whole bunch of integer array it gives some unique no(im not sure wat it is but always gives da same no)

any hep woud be greatful

char *device_no=NULL;
int tempbuf[10];
char* ptr=NULL
int i=0;
int result;
result = ISHELL_GetDeviceInfoEx(pMe->pIShell,AEE_DEVICEITEM_MDN,NULL, &i);
DBGPRINTF( "****Reading buffer ****%d- %d" , result,i);
device_no = (char*) MALLOC (i+1);
result=ISHELL_GetDeviceInfoEx(pMe-pIShell,AEE_DEVICEITEM_MDN,device_no,&i);
DBGPRINTF( "****Reading buffer ****%d" , result);
ptr = device_no;
MEMSET(tempbuf,0,10);
for(i=0;i<10;i++)
{
DBGPRINTF("device no is = %s",ptr);
tempbuf[i] = ATOI(ptr);
ptr++;
DBGPRINTF("temp buf is = %d",tempbuf[i]);

DBGPRINTF("temp buf value is = %d",tempbuf);
I think the logic of printing the number is not corrrect
can we do these
ATOI can not convert string whose lenght is more than 10 becouse it is out of int range
so these doesnot work //int pnumber=ATOI(device_no);
why can we just print that "device_no"
DBGPRINTF("Phone number %s",device_no);
and see whether we get the phone number on the logger.

char *device_no=NULL;
int tempbuf[10];
char* ptr=NULL
int i=0;
int result;
result = ISHELL_GetDeviceInfoEx(pMe->pIShell,AEE_DEVICEITEM_MDN,NULL, &i);
DBGPRINTF( "****Reading buffer ****%d- %d" , result,i);
device_no = (char*) MALLOC (i+1);
result=ISHELL_GetDeviceInfoEx(pMe-pIShell,AEE_DEVICEITEM_MDN,device_no,&i);
DBGPRINTF( "****Reading buffer ****%d" , result);
ptr = device_no;
MEMSET(tempbuf,0,10);
for(i=0;i<10;i++)
{
DBGPRINTF("device no is = %s",ptr);
tempbuf[i] = ATOI(ptr);
ptr++;
DBGPRINTF("temp buf is = %d",tempbuf[i]);

DBGPRINTF("temp buf value is = %d",tempbuf);
I think the logic of printing the number is not corrrect
can we do these
ATOI can not convert string whose lenght is more than 10 becouse it is out of int range
so these doesnot work //int pnumber=ATOI(device_no);
why can we just print that "device_no"
DBGPRINTF("Phone number %s",device_no);
and see whether we get the phone number on the logger.

kumaresh wrote:
I think the logic of printing the number is not corrrect
can we do these
ATOI can not convert string whose lenght is more than 10 becouse it is out of int range
so these doesnot work //int pnumber=ATOI(device_no);
why can we just print that "device_no"
DBGPRINTF("Phone number %s",device_no);
and see whether we get the phone number on the logger.
im not coverting da whole 10 digit at once please check da code, im doing char by char, and by da way DBGPRINTF("Phone number %s",device_no);
the above statement gives 0's, and u knw one of da qualcomm person says in indian devices it does not support, but i find da way of getting phone no

kumaresh wrote:
I think the logic of printing the number is not corrrect
can we do these
ATOI can not convert string whose lenght is more than 10 becouse it is out of int range
so these doesnot work //int pnumber=ATOI(device_no);
why can we just print that "device_no"
DBGPRINTF("Phone number %s",device_no);
and see whether we get the phone number on the logger.
im not coverting da whole 10 digit at once please check da code, im doing char by char, and by da way DBGPRINTF("Phone number %s",device_no);
the above statement gives 0's, and u knw one of da qualcomm person says in indian devices it does not support, but i find da way of getting phone no

can you share the way by which you got the phone number..it will be really helpfull for us.

can you share the way by which you got the phone number..it will be really helpfull for us.

wel its simple u shuld get it from ur operator dats it,

wel its simple u shuld get it from ur operator dats it,