Re: smpp dlr problem
"Andrea Viscovich" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
>atol would not work if the string is in HEX.
Well, the code from Nisan worked fine with my smsc connection,
and I implemented this for atoll.
Maybe under more recent cygwin it's built in.
long long atoll(char *str){
long long result = 0;
int negative=0;
while (*str == ' ' || *str == '\t')
str++;
if (*str == '+')
str++;
else if (*str == '-') {
negative = 1;
str++;
}
while (*str >= '0' && *str <= '9') {
result = (result*10) - (*str++ - '0');
}
return negative ? result : -result;
}
By the way I have the same problem that Shanavaz has, more on next email.
Andrea